GM6000 Digital Heater Controller Branch: main
SDX-1330
Namespaces | Functions
strip.h File Reference

Detailed Description

This file contains a collection of methods that provide basic building blocks for parsing 'tokens' with in a null terminated string.

It also provide functions for removing leading/trailing whitespace.

Go to the source code of this file.

Namespaces

namespace  Cpl
 The 'Cpl' namespace is the root name space for the Colony.
 
namespace  Cpl::Text
 The Text namespace provides yet-another String class and additional string and/or text processing utilities.
 

Functions

const char * Cpl::Text::stripSpace (const char *s)
 This method returns a pointer to the FIRST non-whitespace character in the the specified null-terminated string.
 
const char * Cpl::Text::stripNotSpace (const char *s)
 This method returns a pointer to the FIRST whitespace character in the the specified null-terminated string.
 
const char * Cpl::Text::stripTrailingSpace (const char *s)
 This method returns a pointer to the LAST non-whitespace character in the the specified null-terminated string.
 
void Cpl::Text::removeTrailingSpace (char *s)
 This method TRUNCATES the specified null-terminated string by eliminating any trailing white space.
 
const char * Cpl::Text::stripChars (const char *s, const char *charsSet)
 This method is the same as stripSpace(), except the specified character set is used to terminate the search instead of the standard isspace() characters.
 
const char * Cpl::Text::stripNotChars (const char *s, const char *charsSet)
 This method is the same as stripNotSpace(), except the specified character set is used to terminate the search instead of the standard isspace() characters.
 
const char * Cpl::Text::stripTrailingChars (const char *s, const char *charsSet)
 This method is the same as stripTrailingSpaces(), except the specified character set is used to identify the last "non-whitespace" character.
 
void Cpl::Text::removeTrailingChars (char *s, const char *charsSet)
 This method is the same as removeTrailingSpaces(), except the specified characters set is used for "whitespace" any trailing white space.
 
bool Cpl::Text::isCharInString (const char *charsSet, const char c)
 This method returns true if the character 'c' is one of character(s) contained in 'charsSet'; else false is returned.