Reading a magic marker shows the specific red ink color
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
char * lcase (char *)
|
||||
char * ucase (char *)
|
||||
char * upstart (char *)
|
||||
char * upwords (char *)
|
||||
char * mungspaces (char *)
|
||||
char * trimspaces (char *)
|
||||
char * strip_newline (char *)
|
||||
@@ -147,6 +148,25 @@ upstart(char *s)
|
||||
return s;
|
||||
}
|
||||
|
||||
/* capitalize first letter of every word in a string (in place) */
|
||||
char *
|
||||
upwords(char *s)
|
||||
{
|
||||
char *p;
|
||||
boolean space = TRUE;
|
||||
|
||||
for (p = s; *p; p++)
|
||||
if (*p == ' ') {
|
||||
space = TRUE;
|
||||
} else if (space && letter(*p)) {
|
||||
*p = highc(*p);
|
||||
space = FALSE;
|
||||
} else {
|
||||
space = FALSE;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
/* remove excess whitespace from a string buffer (in place) */
|
||||
char *
|
||||
mungspaces(char *bp)
|
||||
|
||||
Reference in New Issue
Block a user