KSquare Utilities
Configuration.cpp File Reference
#include "FirstIncludes.h"
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
#include "MemoryDebug.h"
#include <windows.h>
#include "Configuration.h"
#include "KKQueue.h"
#include "OSservices.h"
#include "RunLog.h"

Go to the source code of this file.

Classes

class  KKB::Configuration::ConfSection
 
class  KKB::Configuration::ConfSectionList
 
class  KKB::Configuration::Setting
 
class  KKB::Configuration::SettingList
 

Namespaces

 KKB
 KKB The namespace for KKBase Library supporting general functionality needed by almost any application.
 

Functions

void StripOutAnyComments (KKStr &line)
 

Function Documentation

void StripOutAnyComments ( KKStr line)

Definition at line 359 of file Configuration.cpp.

References KKB::KKStr::Len(), KKB::KKStr::operator=(), KKB::KKStr::operator[](), and KKB::KKStr::SubStrPart().

360 {
361  bool found = false;
362  kkint32 len = line.Len ();
363  kkint32 x = 0;
364 
365 
366  while ((x < (len - 1)) && (!found))
367  {
368  if ((line[x] == '/') &&
369  (line[x + 1] == '/'))
370  found = true;
371  else
372  x++;
373  }
374 
375  if (found)
376  {
377  if (x == 0)
378  line = "";
379  else
380  line = line.SubStrPart (0, x - 1);
381  }
382 
383 } /* StripOutAnyComments */
__int32 kkint32
Definition: KKBaseTypes.h:88
kkuint32 Len() const
Returns the number of characters in the string.
Definition: KKStr.h:366
KKStr SubStrPart(kkint32 firstChar) const
returns a SubString consisting of all characters starting at index &#39;firstChar&#39; until the end of the s...
Definition: KKStr.cpp:2780