Re: Split string gives empty elementes



md wrote:

I am trying to use the Split function to remove characters like ' ',
'=' and ';' from a string, but the problem is that if two delimiters
are next to each other, an empty element is inserted in the result
array. I can not use StringSplitOptions as I use .net 1.

Do you know, how can I get rid of these empty elemets?

Skip over them when iterating the array, or create a new array and only
copy across the non-empty elements.

-- Barry

--
http://barrkel.blogspot.com/
.



Relevant Pages

  • Re: VBA - array or collection literals?
    ... Function SplitMultiDelims(Text As String, ... Returns an array of the ... ' See SplitMutliDelimsEX for multi-character delimiters. ... Dim Pos1 As Long ...
    (microsoft.public.excel.programming)
  • Re: Reading Text file into an array
    ... Then split the string with the Split function of whatever ... into an array. ... How do I capture the information between delimiters? ...
    (microsoft.public.excel.programming)
  • Re: Encoding Question
    ... Then build a string using ... so the only "problem" is finding the delimiters in the byte array then. ... > need to do any scanning. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Converting byte array to string.
    ... > We are having problem in converting a byte array to string, ... we found that the char (delimiters) specified above are replaced ... > with different char. ...
    (microsoft.public.dotnet.languages.csharp)
  • 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)

Loading