Page 1 of 1

Split Str

PostPosted: Jan 31, 2009 @ 7:28pm
by yucani
Hi,

as i am working a lot with WCHAR (and have no STL), i would like to know, if there is a nice way of implementing SplitStr with EDGE.
Or if there will be in the next Lib releases more String Funtions like StrFind(Str,Compare,StartPos) , rfind or substr?

Until now i create SplitStr following way:

pos=StrFind(Str,Delimeter)
StrCpy(Str,Dest,pos)
StrReplace(Str,Dest,"",1)
StrReplace(Str,Delimeter,"",1)

what seems to be helpfull, until the delimeter is a normal char (not a TAB or NL for example).

Is there a better way to do it on WCHARs?

PostPosted: Feb 2, 2009 @ 11:24am
by edge
Hi Yucani,

You can try converting the WCHAR to a normal char by using the ClassEStd :: StrCpy functions. Alternatively, you can also use the EString class. It contains a substring function.