(svn r21133) -Add: function to check the validity of a string (without modifying it)

This commit is contained in:
rubidium
2010-11-10 17:49:14 +00:00
parent 8cd48767f9
commit 17b514ccd1
2 changed files with 32 additions and 0 deletions

View File

@@ -117,6 +117,15 @@ void str_strip_colours(char *str);
/** Convert the given string to lowercase, only works with ASCII! */
void strtolower(char *str);
/**
* Checks whether the given string is valid, i.e. contains only
* valid (printable) characters and is properly terminated.
* @param str The string to validate.
* @param last The last character of the string, i.e. the string
* must be terminated here or earlier.
*/
bool StrValid(const char *str, const char *last);
/**
* Check if a string buffer is empty.
*