Re: Substring with unknown length (newbie)



On 25 Nov 2005 05:46:54 -0800, "Lene" <lenehell@xxxxxxxxxxx> wrote:

>that means I'll have difficulties using the 'copy' function since
>it requires length parameter.

<quote>
If Count specifies more characters or elements than are available,
only the characters or elements from S[Index] to the end of S are
returned.
<quote>

So if the Count is MaxInt you get what you want
- personally I would wrap it in a function called something like
CopyResidue( Start, S )

Even better :
StrExtResidue( TheStr, TheDelin, CountOfTheDelin )

eg: S := StrExtResidue( SrcStr, ',' , 2 )

OverLoad it for: S := StrExtResidue( SrcStr, ',' )

Very useful library routines.

.



Relevant Pages

  • Re: Mandis Quotes (aka retiring """ and )
    ... characters not be allowed, ... Then I remembered string ... Any binary data can be inside the quote. ...
    (comp.lang.python)
  • Re: John Ringo Forsees a Glorious Future
    ... entertaining) to quote the disclaimer from "Kildar": ... This is a work of fiction. ... All the characters and events portrayed in this book are fictional, ... Heck, there is no Kildar. ...
    (rec.arts.sf.written)
  • Re: ISE & VHDL : how to include time/date
    ... the backslash-escaped quote characters are pretty ugly. ... Now the literal quote characters are part of the GDATE_with_space ... project set {Generics, Parameters} $GDATE_with_space \ ... I used a backslash character to allow line continuation; ...
    (comp.arch.fpga)
  • Re: Replacing WP Typographic Symbols in Word 2002
    ... Typographical Symbol" characters are converted into the proper Unicode ... replacement font for "WP Typographical Symbols", ... Typographical Symbols" again, and you can then use "Find/Replace" (this ... Case &H3D ' single high comma quote ...
    (microsoft.public.word.conversions)
  • Re: compiling error
    ... >:when mixing quotes from others who use the conventional quote marking. ... >for humans. ... Humans are very good at pattern matching with distinct ... >characters, but not nearly as good at mentally counting rows of ...
    (comp.lang.c)