String Utilities
class StringUtil
#include "StringUtil.h"
The StringUtil class provides static methods for:
- determining if one string is a prefix of another string
- determining if one string is a suffix of another string
- converting a string to lower-case
- trimming the whitespace from the beginning and ending of a string
Methods
static bool IsPrefix(const string & str, const string & prefix)
Returns true if prefix is a prefix of str, and false if it is not.
static bool IsSuffix(const string & str, const string & suffix)
Returns true if suffix is a suffix of str, and false if it is not.
static void ToLower(string & str)
Converts each character in str to lower-case.
static void Trim(string & str)
Removes all leading and trailing whitespace from str.
Ken Rodham