#ident "$URL: svn://elmer/devel/SVN/SDDAS/trunk/libdB/db_string.c $ %D% SwRI" #include #include /********************* ** >FILE: db_string.c *********************/ /********************************** ** Function: char *rtrim(char *s) ** ** s string to trim ** ** Description: ** strip off any trailing spaces. ** ** Return Values: ** ***************** *****************/ char *rtrim(char *s) { char *str; str = s + strlen(s)-1; for (; s 0) p++; memcpy(s, p, strlen(s)); return s; } /*********************************** ** Function: void to_upper(char *s) ** ** s string to change ** ** Description: ** change each character in the string to uppercase. ** ** Return Values: ** ***************** *****************/ void to_upper(char *s) { char *c; for (c=s; *c!=0; c++) /* | if the character is lower case make it upper case */ if (islower((int) *c)) *c = toupper((int) *c); }