This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Split Str


Split Str

Postby yucani » Jan 31, 2009 @ 7:28pm

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?
User avatar
yucani
pm Member
 
Posts: 29
Joined: Jan 11, 2008 @ 11:19am


Postby edge » Feb 2, 2009 @ 11:24am

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.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron