util/StringUtil: move code to StripRight()
This commit is contained in:
@@ -39,6 +39,20 @@ StripLeft(char *p)
|
||||
return const_cast<char *>(StripLeft((const char *)p));
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the string's length as if it was stripped on the right
|
||||
* side.
|
||||
*/
|
||||
gcc_pure
|
||||
size_t
|
||||
StripRight(const char *p, size_t length);
|
||||
|
||||
/**
|
||||
* Strip trailing whitespace by null-terminating the string.
|
||||
*/
|
||||
void
|
||||
StripRight(char *p);
|
||||
|
||||
/**
|
||||
* Skip whitespace at the beginning and terminate the string after the
|
||||
* last non-whitespace character.
|
||||
|
Reference in New Issue
Block a user