string/whitespace handling cleanups (bug #4449, with mods)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-06-17 13:25:01 +00:00
parent fb6f36387f
commit 9a80a7bc2c
3 changed files with 143 additions and 192 deletions

View File

@@ -130,6 +130,27 @@ struct ast_hostent {
char buf[1024];
};
/*!
\brief Gets a pointer to the first non-whitespace character in a string.
\param str the input string
\return a pointer to the first non-whitespace character
*/
char *ast_skip_blanks(char *str);
/*!
\brief Trims trailing whitespace characters from a string.
\param str the input string
\return a pointer to the NULL following the string
*/
char *ast_trim_blanks(char *str);
/*!
\brief Gets a pointer to first whitespace character in a string.
\param str the input string
\return a pointer to the first whitespace character
*/
char *ast_skip_nonblanks(char *str);
/*!
\brief Strip leading/trailing whitespace from a string.
\param s The string to be stripped (will be modified).