URL
https://opencores.org/ocsvn/thor/thor/trunk
Subversion Repositories thor
[/] [thor/] [trunk/] [FT64v5/] [software/] [CC64/] [source/] [rtrim.cpp] - Rev 48
Compare with Previous | Blame | View Log
#include "stdafx.h" #include <string.h> #include <ctype.h> /* --------------------------------------------------------------- Description : Trims spaces from the right side of a string. Spaces are anything considered to be a space character by the isspace() function. --------------------------------------------------------------- */ char *rtrim(char *str) { int ii; ii = strlen(str); if (ii) { --ii; while(ii >= 0 && isspace(str[ii])) --ii; ii++; str[ii] = '\0'; } return str; }