PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Split Str

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?
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.