Re: Substring with unknown length (newbie)



Take a look at delphis help for strings

this might work:

Result := Copy(InputStr, 1, Pos('>', InputStr));

Pos will return the position needed, and in Copy here it is the length.
Take a look at the help for those 2. Also, there is one function to
compare Ansi strings, but that is probably somehwere in the help

S

.



Relevant Pages

  • Re: Best way to update html tag
    ... "Tom Corcoran" wrote in message ... > a html parser component, I guess one could use one of the xml/dom ones ... Pos works on plain text, ... works much better on simple long strings. ...
    (comp.lang.pascal.delphi.misc)
  • Re: HyperStr
    ... For long strings, such effort is well worth it. ... such effort is probably a waste of time. ... My typical Pos use is for a single character in about 10 ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: string crossing and hand position
    ... positioned to operate on adjacent strings. ... I am playing it on the V pos, ... _or_ it could play the A, then shift to get the notes in opt flex ... The first choice causes the im to reach into overflexed position but ...
    (rec.music.classical.guitar)
  • Re: PARSENAME for 6 parts
    ... RETURNS @Strings TABLE ... @Pos INT; ... SET @Pos = CHARINDEX; ... I've used the PARSENAME function in the past for similar activities ...
    (microsoft.public.sqlserver.server)
  • Counting Chars Within Strings
    ... Alright a couple of stupid questions here about strings and Chars. ... public class CountVowels ... pos = String1.charAt; ...
    (comp.lang.java.programmer)