Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

stringutil.h

Go to the documentation of this file.
00001 #ifndef STRINGUTIL_H 00002 #define STRINGUTIL_H 00003 00004 #include <exception> 00005 #include <string> 00006 00007 #include "common.h" 00008 00009 BOREALIS_NAMESPACE_BEGIN; 00010 00011 // Returns the substring of 's' between the 'startIdx' index to (but not 00012 // including) the first occurance of the character 'terminator'. 00013 // 00014 // If 'startIdx' is > the max index into 's', an exception is thrown. 00015 // 00016 // If 'terminator' doesn't appear in 's', an exception will be 00017 // thrown. 00018 string getSubstringBeforeChar(const string & s, 00019 string::size_type startIdx, 00020 const char terminator) 00021 throw (exception); 00022 00023 00024 // Creates on the heap, using the 'new char[...]', a NULL-terminated c-string 00025 // with the same content as 's'. The caller accepts ownership of the allocated 00026 // c-str. 00027 char * newCstrCopy(const string & s) 00028 throw (exception); 00029 00030 BOREALIS_NAMESPACE_END; 00031 00032 #endif

Generated on Fri Nov 12 15:15:22 2004 for Borealis by doxygen 1.3.8