KSquare Utilities
KKB::KKStrParser Class Reference

Class that manages the extraction of tokens from a String without being destructive to the original string. More...

#include <KKStrParser.h>

Public Member Functions

 KKStrParser (const KKStrParser &_strParser)
 
 KKStrParser (const char *_str)
 
 KKStrParser (const KKStr &_str)
 
 KKStrParser (KKStr &&_str)
 
 ~KKStrParser ()
 
char GetLastChar ()
 
char GetNextChar ()
 
KKStr GetNextToken (const char *delStr="\n\t\r ")
 Extract next Token from string, tokens will be separated by delimiter characters. More...
 
bool GetNextTokenBool (const char *delStr="\n\t\r ")
 
char GetNextTokenChar (const char *delStr="\n\t\r ")
 
KKB::DateTime GetNextTokenDateTime (const char *delStr="\n\t\r ")
 
double GetNextTokenDouble (const char *delStr="\n\t\r ")
 
float GetNextTokenFloat (const char *delStr="\n\t\r ")
 
kkint32 GetNextTokenInt (const char *delStr="\n\t\r ")
 
long GetNextTokenLong (const char *delStr="\n\t\r ")
 
kkuint32 GetNextTokenUint (const char *delStr="\n\t\r ")
 
KKStr GetRestOfLine ()
 
KKStr GetRestOfStr ()
 
char LastDelimiter () const
 
bool MoreTokens () const
 
char PeekLastChar () const
 
char PeekNextChar () const
 
KKStr PeekNextToken (const char *delStr="\n\t\r ") const
 Will use the same rules as "GetNextToken" to retrieve the next token n the string but will not advance the next character pointer. More...
 
void Reset ()
 
void SkipWhiteSpace (const char *whiteSpace=" ")
 Advances the next-character pointer to the next NOT white space character. More...
 
VectorKKStr Split (const char *delStr="\n\t\r ")
 
const char * Str () const
 
KKStr SubStrPart (kkuint32 firstChar, kkuint32 lastChar) const
 
void TrimWhiteSpace (const char *_whiteSpace=" ")
 After this call all leading and trailing whitespace will be trimmed from tokens. More...
 

Detailed Description

Class that manages the extraction of tokens from a String without being destructive to the original string.

Definition at line 18 of file KKStrParser.h.

Constructor & Destructor Documentation

KKStrParser::KKStrParser ( const KKStrParser _strParser)

Definition at line 28 of file KKStrParser.cpp.

References KKStrParser(), and KKB::STRDUP().

Referenced by KKStrParser().

28  :
29  len ((kkuint32)strlen (_strParser.str)),
30  nextPos (_strParser.nextPos),
31  str (_strParser.str),
32  trimWhiteSpace (_strParser.trimWhiteSpace),
33  weOwnStr (false),
34  whiteSpace (NULL)
35 {
36  if (_strParser.whiteSpace)
37  whiteSpace = STRDUP (_strParser.whiteSpace);
38 }
char * STRDUP(const char *src)
Definition: KKStr.cpp:62
unsigned __int32 kkuint32
Definition: KKBaseTypes.h:89
KKStrParser::KKStrParser ( const char *  _str)

Definition at line 54 of file KKStrParser.cpp.

References KKStrParser().

Referenced by KKStrParser(), and KKB::KKStr::ToVectorInt32().

54  :
55  len ((kkuint16)strlen (_str)),
56  nextPos (0),
57  str (_str),
58  trimWhiteSpace (false),
59  weOwnStr (false),
60  whiteSpace (NULL)
61 {
62 }
unsigned __int16 kkuint16
16 bit unsigned integer.
Definition: KKBaseTypes.h:86
KKStrParser::KKStrParser ( const KKStr _str)

Definition at line 42 of file KKStrParser.cpp.

References KKB::KKStr::Len(), and KKB::KKStr::Str().

Referenced by KKB::DateTime::DateTime(), KKMLL::MLClassIndexList::ParseClassIndexList(), KKMLL::AttributeTypeVector::ReadXML(), KKB::VectorKKStr::ReadXML(), KKMLL::ClassProbList::ReadXML(), SVM233::SvmModel233::ReadXML(), KKB::KKStrList::ReadXML(), KKB::KKStrListIndexed::ReadXML(), KKB::XmlElementKeyValuePairs::XmlElementKeyValuePairs(), KKMLL::XmlElementMLClassNameList::XmlElementMLClassNameList(), and KKB::XmlTag::XmlTag().

42  :
43  len (_str.Len ()),
44  nextPos (0),
45  str (_str.Str ()),
46  trimWhiteSpace (false),
47  weOwnStr (false),
48  whiteSpace (NULL)
49 {
50 }
kkuint32 Len() const
Returns the number of characters in the string.
Definition: KKStr.h:366
const char * Str() const
Returns a pointer to a ascii string.
Definition: KKStr.h:422
KKStrParser::KKStrParser ( KKStr &&  _str)

Definition at line 66 of file KKStrParser.cpp.

References KKB::KKStr::Len(), KKB::KKStr::Str(), and KKB::STRDUP().

66  :
67  len (_str.Len ()),
68  nextPos (0),
69  str (_str.Str ()),
70  trimWhiteSpace (false),
71  weOwnStr (true),
72  whiteSpace (NULL)
73 {
74  str = KKB::STRDUP (_str.Str ());
75  weOwnStr = true;
76 }
char * STRDUP(const char *src)
Definition: KKStr.cpp:62
kkuint32 Len() const
Returns the number of characters in the string.
Definition: KKStr.h:366
const char * Str() const
Returns a pointer to a ascii string.
Definition: KKStr.h:422
KKStrParser::~KKStrParser ( )

Definition at line 82 of file KKStrParser.cpp.

83 {
84  delete whiteSpace;
85  if (weOwnStr)
86  {
87  delete str;
88  str = NULL;
89  }
90 }

Member Function Documentation

char KKStrParser::GetLastChar ( )

Definition at line 350 of file KKStrParser.cpp.

Referenced by KKB::XmlTag::XmlTag().

351 {
352  char lastChar = 0;
353  if (nextPos < len)
354  {
355  --len;
356  lastChar = str[len];
357  }
358  return lastChar;
359 }
char KKStrParser::GetNextChar ( )

Definition at line 337 of file KKStrParser.cpp.

Referenced by KKB::XmlTag::XmlTag().

338 {
339  char nextChar = 0;
340  if (nextPos < len)
341  {
342  nextChar = str[nextPos];
343  ++nextPos;
344  }
345  return nextChar;
346 }
KKStr KKStrParser::GetNextToken ( const char *  delStr = "\n\t\r ")

Extract next Token from string, tokens will be separated by delimiter characters.

Removes next Token from string. The token will be terminated by end of string or the first occurrence of a delimiter character. If no more tokens left will return a Empty KKStr. If you want to remove leading and trailing whitespace characters you need to call the "TrimWhiteSpace" method.

Quoted Strings will be treated differently. If the first character in the token is a quote(") or apostrophe(') character then the token will include all characters until the matching quote character. The quote characters will be NOT be included in the token. The next character pointer will be set to the following delimiter character. The quote characters must match. That is if the first quote character was (') then the terminating quote character also be ('). The special escape sequences ("\t", "\n", "\r", "\\", '"', and "\'" will be translated into (tab), (line-feed), (carriage-return), (back-slash), (quote), and (apostrophe).

Parameters
[in]delStrList of delimiter characters.
Returns
Extracted Token.

Definition at line 131 of file KKStrParser.cpp.

References KKB::KKStr::Append(), KKB::KKStr::Concat(), KKB::KKStr::EmptyStr(), and KKB::KKStr::KKStr().

Referenced by KKB::DateTime::DateTime(), GetNextTokenBool(), GetNextTokenChar(), GetNextTokenDateTime(), GetNextTokenDouble(), GetNextTokenFloat(), GetNextTokenInt(), GetNextTokenLong(), GetNextTokenUint(), KKMLL::MLClassIndexList::ParseClassIndexList(), KKMLL::AttributeTypeVector::ReadXML(), KKB::VectorKKStr::ReadXML(), KKMLL::ClassProbList::ReadXML(), SVM233::SvmModel233::ReadXML(), KKB::KKStrList::ReadXML(), KKB::KKStrListIndexed::ReadXML(), KKB::KKStr::ToVectorInt32(), KKB::XmlElementKeyValuePairs::XmlElementKeyValuePairs(), KKMLL::XmlElementMLClassNameList::XmlElementMLClassNameList(), and KKB::XmlTag::XmlTag().

132 {
133  lastDelimiter = 0;
134 
135  if (trimWhiteSpace)
136  {
137  while ((nextPos < len) && (strchr (whiteSpace, str[nextPos]) != NULL))
138  nextPos++;
139  }
140 
141  if (nextPos >= len)
142  return KKStr::EmptyStr ();
143 
144  kkuint32 startPos = nextPos;
145  kkuint32 endPos = startPos;
146 
147  char ch = str[endPos];
148  if ((ch == '\'') || (ch == '"'))
149  {
150  KKStr token (30);
151  // Token is a string
152  char quoteChar = ch;
153 
154  // We have a quoted String need to skip to end of quote.
155 
156  ++endPos; // Skipped past initial quote character.
157  while (endPos < len)
158  {
159  ch = str[endPos];
160  if (ch == quoteChar)
161  break;
162 
163  if ((ch == '\\') && (endPos < (len - 1)))
164  {
165  ++endPos;
166  char ec = str[endPos];
167  switch (ec)
168  {
169  case '\\': ch = '\\'; break;
170  case '"': ch = '"'; break;
171  case 'r': ch = '\r'; break;
172  case 'n': ch = '\n'; break;
173  case 't': ch = '\t'; break;
174  }
175  }
176 
177  token.Append (ch);
178  ++endPos;
179  }
180 
181  if (endPos >= len)
182  {
183  nextPos = len;
184  }
185  else
186  {
187  // Now that we are at the end of the quoted String we need set the next character pointer to just past the following delimiter character.
188  nextPos = endPos + 1;
189  if (trimWhiteSpace)
190  {
191  while ((nextPos < len) && (strchr (whiteSpace, str[nextPos]) != NULL))
192  nextPos++;
193  }
194 
195  if ((nextPos < len) && (strchr (delStr, str[nextPos]) != NULL))
196  {
197  lastDelimiter = str[nextPos];
198  ++nextPos;
199  }
200  }
201  return token;
202  }
203  else
204  {
205  // scan until end of string or next delimiter
206  kkuint32 delimeterIdx = 0;
207  bool delimeterFound = false;
208  while (endPos < len)
209  {
210  ch = str[endPos];
211  if (strchr (delStr, ch) != NULL)
212  {
213  lastDelimiter = ch;
214  delimeterFound = true;
215  delimeterIdx = endPos;
216  break;
217  }
218  ++endPos;
219  }
220 
221  endPos--; // Move endPos back to last character in token.
222 
223  if (trimWhiteSpace)
224  {
225  while ((endPos >= startPos) && (strchr (whiteSpace, str[endPos]) != NULL))
226  endPos--;
227  }
228 
229 
230  if (delimeterFound)
231  nextPos = delimeterIdx + 1;
232 
233  else if (endPos >= len)
234  nextPos = len;
235 
236  else
237  nextPos = endPos + 1;
238 
239  if (trimWhiteSpace)
240  {
241  while ((nextPos < len) && (strchr (whiteSpace, str[nextPos]) != NULL))
242  ++nextPos;
243  }
244 
245  return KKStr (str, startPos, endPos);
246  }
247 } /* GetNextToken */
unsigned __int32 kkuint32
Definition: KKBaseTypes.h:89
static const KKStr & EmptyStr()
Static method that returns an Empty String.
Definition: KKStr.cpp:3453
bool KKStrParser::GetNextTokenBool ( const char *  delStr = "\n\t\r ")

Definition at line 438 of file KKStrParser.cpp.

References GetNextToken(), and KKB::KKStr::ToBool().

439 {
440  return GetNextToken (delStr).ToBool ();
441 }
KKStr GetNextToken(const char *delStr="\n\t\r ")
Extract next Token from string, tokens will be separated by delimiter characters. ...
bool ToBool() const
Returns the bool equivalent of the string, ex &#39;Yes&#39; = true, &#39;No&#39; = false, &#39;True&#39; = true...
Definition: KKStr.cpp:3523
char KKStrParser::GetNextTokenChar ( const char *  delStr = "\n\t\r ")

Definition at line 388 of file KKStrParser.cpp.

References KKB::KKStr::Concat(), GetNextToken(), and KKB::KKStr::operator[]().

389 {
390  KKStr nextToken = GetNextToken (delStr);
391  char nextTokenChar = nextToken[0];
392  return nextTokenChar;
393 }
KKStr GetNextToken(const char *delStr="\n\t\r ")
Extract next Token from string, tokens will be separated by delimiter characters. ...
KKB::DateTime KKStrParser::GetNextTokenDateTime ( const char *  delStr = "\n\t\r ")

Definition at line 396 of file KKStrParser.cpp.

References KKB::DateTime::DateTime(), and GetNextToken().

397 {
398  return KKB::DateTime (GetNextToken (delStr));
399 }
KKStr GetNextToken(const char *delStr="\n\t\r ")
Extract next Token from string, tokens will be separated by delimiter characters. ...
double KKStrParser::GetNextTokenDouble ( const char *  delStr = "\n\t\r ")

Definition at line 418 of file KKStrParser.cpp.

References GetNextToken(), and KKB::KKStr::ToDouble().

Referenced by KKMLL::ClassProbList::ReadXML(), and SVM233::SvmModel233::ReadXML().

419 {
420  return GetNextToken (delStr).ToDouble ();
421 }
KKStr GetNextToken(const char *delStr="\n\t\r ")
Extract next Token from string, tokens will be separated by delimiter characters. ...
double ToDouble() const
Definition: KKStr.cpp:3541
float KKStrParser::GetNextTokenFloat ( const char *  delStr = "\n\t\r ")

Definition at line 424 of file KKStrParser.cpp.

References GetNextToken(), and KKB::KKStr::ToFloat().

Referenced by KKMLL::ClassProbList::ReadXML().

425 {
426  return GetNextToken (delStr).ToFloat ();
427 }
KKStr GetNextToken(const char *delStr="\n\t\r ")
Extract next Token from string, tokens will be separated by delimiter characters. ...
float ToFloat() const
Definition: KKStr.cpp:3553
kkint32 KKStrParser::GetNextTokenInt ( const char *  delStr = "\n\t\r ")

Definition at line 404 of file KKStrParser.cpp.

References GetNextToken(), and KKB::KKStr::ToInt().

Referenced by KKMLL::AttributeTypeVector::ReadXML(), and SVM233::SvmModel233::ReadXML().

405 {
406  return GetNextToken (delStr).ToInt ();
407 }
KKStr GetNextToken(const char *delStr="\n\t\r ")
Extract next Token from string, tokens will be separated by delimiter characters. ...
kkint32 ToInt() const
Definition: KKStr.cpp:3565
long KKStrParser::GetNextTokenLong ( const char *  delStr = "\n\t\r ")

Definition at line 411 of file KKStrParser.cpp.

References GetNextToken(), and KKB::KKStr::ToLong().

412 {
413  return GetNextToken (delStr).ToLong ();
414 }
KKStr GetNextToken(const char *delStr="\n\t\r ")
Extract next Token from string, tokens will be separated by delimiter characters. ...
long ToLong() const
Definition: KKStr.cpp:3611
kkuint32 KKStrParser::GetNextTokenUint ( const char *  delStr = "\n\t\r ")

Definition at line 431 of file KKStrParser.cpp.

References GetNextToken(), and KKB::KKStr::ToUint().

432 {
433  return GetNextToken (delStr).ToUint ();
434 }
KKStr GetNextToken(const char *delStr="\n\t\r ")
Extract next Token from string, tokens will be separated by delimiter characters. ...
kkuint32 ToUint() const
Definition: KKStr.cpp:3636
KKStr KKStrParser::GetRestOfLine ( )

Definition at line 445 of file KKStrParser.cpp.

References KKB::KKStr::Append(), KKB::KKStr::Concat(), KKB::KKStr::EmptyStr(), KKB::KKStr::KKStr(), and KKB::KKStr::TrimRight().

446 {
447  if (trimWhiteSpace)
448  {
449  while ((nextPos < len) && (strchr (whiteSpace, str[nextPos]) != NULL))
450  nextPos++;
451  }
452 
453  if (nextPos >= len)
454  return KKStr::EmptyStr ();
455 
456  KKStr result (1 + len - nextPos);
457  char lastChar = 0;
458 
459  while (nextPos < len)
460  {
461  lastChar = str[nextPos];
462  if (lastChar == '\n')
463  break;
464 
465  else if (lastChar == '\r')
466  break;
467 
468  result.Append (lastChar);
469  nextPos++;
470  }
471 
472  if (nextPos < len)
473  {
474  if (lastChar == '\n')
475  {
476  if (str[nextPos] == '\r')
477  nextPos++;
478  }
479  else if (lastChar == '\r')
480  {
481  if (str[nextPos] == '\n')
482  nextPos ++;
483  }
484  }
485 
486  if (trimWhiteSpace)
487  result.TrimRight (whiteSpace);
488 
489  return result;
490 } /* GetRestOfLine */
static const KKStr & EmptyStr()
Static method that returns an Empty String.
Definition: KKStr.cpp:3453
KKStr KKStrParser::GetRestOfStr ( )

Definition at line 494 of file KKStrParser.cpp.

References KKB::KKStr::Append(), KKB::KKStr::Concat(), KKB::KKStr::EmptyStr(), KKB::KKStr::KKStr(), and KKB::KKStr::TrimRight().

Referenced by KKB::DateTime::DateTime().

495 {
496  if (trimWhiteSpace)
497  {
498  while ((nextPos < len) && (strchr (whiteSpace, str[nextPos]) != NULL))
499  nextPos++;
500  }
501 
502  if (nextPos >= len)
503  return KKStr::EmptyStr ();
504 
505  KKStr result (1 + len - nextPos);
506  while (nextPos < len)
507  {
508  result.Append (str[nextPos]);
509  nextPos++;
510  }
511 
512  if (trimWhiteSpace)
513  result.TrimRight (whiteSpace);
514 
515  return result;
516 } /* GetRestOfStr */
static const KKStr & EmptyStr()
Static method that returns an Empty String.
Definition: KKStr.cpp:3453
char KKB::KKStrParser::LastDelimiter ( ) const
inline

Definition at line 72 of file KKStrParser.h.

Referenced by KKMLL::MLClassIndexList::ParseClassIndexList().

72 {return lastDelimiter;}
char KKStrParser::PeekLastChar ( ) const

Definition at line 375 of file KKStrParser.cpp.

Referenced by KKB::XmlTag::XmlTag().

376 {
377  char lastChar = 0;
378  if (nextPos < len)
379  {
380  lastChar = str[len - 1];
381  }
382  return lastChar;
383 }
char KKStrParser::PeekNextChar ( ) const

Definition at line 363 of file KKStrParser.cpp.

Referenced by KKB::XmlTag::XmlTag().

364 {
365  char nextChar = 0;
366  if (nextPos < len)
367  {
368  nextChar = str[nextPos];
369  }
370  return nextChar;
371 }
KKStr KKStrParser::PeekNextToken ( const char *  delStr = "\n\t\r ") const

Will use the same rules as "GetNextToken" to retrieve the next token n the string but will not advance the next character pointer.

Returns what the next token that 'GetNextToken' will without updating the position in the string buffer.

Allows you to see what the token would be without updating the KKStrParser instance.

Parameters
[in]delStrList of delimiting characters.
Returns
Next Token to be returned by 'GetNextToken'.

Definition at line 258 of file KKStrParser.cpp.

References KKB::KKStr::Append(), KKB::KKStr::Concat(), KKB::KKStr::EmptyStr(), and KKB::KKStr::KKStr().

259 {
260  kkuint32 nextPosP = nextPos;
261 
262  if (trimWhiteSpace)
263  {
264  while ((nextPos < len) && (strchr (whiteSpace, str[nextPosP]) != NULL))
265  nextPosP++;
266  }
267 
268  if (nextPosP >= len)
269  return KKStr::EmptyStr ();
270 
271  kkuint32 startPos = nextPosP;
272  kkuint32 endPos = startPos;
273 
274  char ch = str[endPos];
275  if ((ch == '\'') || (ch == '"'))
276  {
277  KKStr token (30);
278  // Token is a string
279  char quoteChar = ch;
280  // We have a quoted String need to skip to end of quote.
281  ++endPos;
282  while (endPos < len)
283  {
284  ch = str[endPos];
285  if (ch == quoteChar)
286  {
287  ++endPos;
288  break;
289  }
290 
291  if ((ch == '\\') && (endPos < (len - 1)))
292  {
293  ++endPos;
294  char ec = str[endPos];
295  switch (ec)
296  {
297  case '"': ch = '"'; break;
298  case '\\': ch = '\\'; break;
299  case 'r': ch = '\r'; break;
300  case 'n': ch = '\n'; break;
301  case 't': ch = '\t'; break;
302  }
303  }
304 
305  token.Append (ch);
306  ++endPos;
307  }
308  return token;
309  }
310  else
311  {
312  // scan until end of string or next delimiter
313  while (endPos < len)
314  {
315  ch = str[endPos];
316  if (strchr (delStr, ch) != NULL)
317  {
318  break;
319  }
320  ++endPos;
321  }
322 
323  endPos--; // Move endPos back to last character in token.
324 
325  if (trimWhiteSpace)
326  {
327  while ((endPos >= startPos) && (strchr (whiteSpace, str[endPos]) != NULL))
328  endPos--;
329  }
330 
331  return KKStr (str, startPos, endPos);
332  }
333 } /* PeekNextToken */
unsigned __int32 kkuint32
Definition: KKBaseTypes.h:89
static const KKStr & EmptyStr()
Static method that returns an Empty String.
Definition: KKStr.cpp:3453
void KKStrParser::Reset ( )

Definition at line 520 of file KKStrParser.cpp.

521 {
522  nextPos = 0;
523 }
void KKStrParser::SkipWhiteSpace ( const char *  whiteSpace = " ")

Advances the next-character pointer to the next NOT white space character.

Definition at line 111 of file KKStrParser.cpp.

Referenced by TrimWhiteSpace(), and KKB::XmlTag::XmlTag().

112 {
113  while ((nextPos < len) && (strchr (whiteSpace, str[nextPos]) != NULL))
114  nextPos++;
115 } /* SkipWhiteSpce */
VectorKKStr KKStrParser::Split ( const char *  delStr = "\n\t\r ")

Definition at line 119 of file KKStrParser.cpp.

120 {
121  VectorKKStr tokens;
122  while (MoreTokens ())
123  tokens.push_back (this->GetNextToken (delStr));
124  return tokens;
125 }
KKStr GetNextToken(const char *delStr="\n\t\r ")
Extract next Token from string, tokens will be separated by delimiter characters. ...
bool MoreTokens() const
Definition: KKStrParser.h:74
const char* KKB::KKStrParser::Str ( ) const
inline

Definition at line 96 of file KKStrParser.h.

96 {return str;}
KKStr KKStrParser::SubStrPart ( kkuint32  firstChar,
kkuint32  lastChar 
) const

Definition at line 528 of file KKStrParser.cpp.

References KKB::KKStr::Append(), KKB::KKStr::Concat(), KKB::KKStr::EmptyStr(), and KKB::KKStr::KKStr().

531 {
532  if (lastChar < firstChar)
533  return KKStr::EmptyStr ();
534 
535  kkuint32 subStrLen = (1 + lastChar - firstChar);
536  KKStr result (subStrLen + 1);
537 
538  if (lastChar >= len)
539  lastChar = len - 1;
540 
541  kkuint32 idx = 0;
542  for (idx = firstChar; idx <= lastChar; idx++)
543  result.Append (str[idx]);
544 
545  return result;
546 }
unsigned __int32 kkuint32
Definition: KKBaseTypes.h:89
static const KKStr & EmptyStr()
Static method that returns an Empty String.
Definition: KKStr.cpp:3453
void KKStrParser::TrimWhiteSpace ( const char *  _whiteSpace = " ")

After this call all leading and trailing whitespace will be trimmed from tokens.

The next character pointer will be advanced to the next NON whitespace character.

Definition at line 95 of file KKStrParser.cpp.

References SkipWhiteSpace(), and KKB::STRDUP().

Referenced by KKMLL::MLClassIndexList::ParseClassIndexList(), KKMLL::AttributeTypeVector::ReadXML(), KKB::VectorKKStr::ReadXML(), KKMLL::ClassProbList::ReadXML(), SVM233::SvmModel233::ReadXML(), KKB::KKStrList::ReadXML(), KKB::XmlElementKeyValuePairs::XmlElementKeyValuePairs(), KKMLL::XmlElementMLClassNameList::XmlElementMLClassNameList(), and KKB::XmlTag::XmlTag().

96 {
97  delete whiteSpace;
98  whiteSpace = NULL;
99 
100  trimWhiteSpace = true;
101  if (_whiteSpace)
102  whiteSpace = STRDUP (_whiteSpace);
103  else
104  whiteSpace = STRDUP (" ");
105 
106  SkipWhiteSpace (whiteSpace);
107 }
char * STRDUP(const char *src)
Definition: KKStr.cpp:62
void SkipWhiteSpace(const char *whiteSpace=" ")
Advances the next-character pointer to the next NOT white space character.

The documentation for this class was generated from the following files: