Re: Parsing between a character and sysmbol

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Scott M. wrote:
This seems much more complicated than it need be. Why search for the "-"
when you can immediately split the string at its location and throw away the
part you don't need?

Because split does just that: searches for a pattern. And then allocate
an array. And then populate each member of the array with a copy of the
slice between the separator.

It just bothers me to use Split to do that. Just as IsNumeric: it works
by converting the string to Double, what seems a terrible waste of
processing, to me.

The code seems too much effort but it also seems efficient, to me.
YMMV.

Regards,

Branco.

.



Relevant Pages

  • Re: Enumerated types
    ... Scott. ... I now understand enumerated types rather ... One alternative I could try, in the mean time, is to declare a string array ...
    (microsoft.public.access.formscoding)
  • Re: SQL query... is there a better way?
    ... Scott ... > data types, you can understand how data is stored, and what exactly it is. ... and exposed them as public string properties. ... Of course, an array is of fixed length, so you need to either ...
    (microsoft.public.dotnet.framework.aspnet)
  • Help in French|Spanish|German translation.
    ... I am also an author of User-defined string functions. ... WORDTRANEX (cSearched, cArExpressionSought | cExpressionSough, ... each string of the array is searched ... If the parameter nArStartOccurrence is -1 or omitted, the replacement starts ...
    (microsoft.public.fox.helpwanted)
  • Re: passing a string to a dll
    ... Joe, I really appreciate you taking the time to demonstrate this. ... sure how I would implement indexing it for random alphanumeric codes. ... I might handle the array. ... I actually have been wondering if I could use a second string ...
    (microsoft.public.vc.mfc)
  • Re: passing a string to a dll
    ... I might handle the array. ... I actually have been wondering if I could use a second string ... look at insertion cost, organization cost, and search cost. ...
    (microsoft.public.vc.mfc)