#include "spice.h"
#include "misc.h"
Go to the source code of this file.
|
int | prefix (char *p, char *s) |
|
char * | copy (char *str) |
|
int | substring (char *sub, char *str) |
|
void | appendc (char *s, char c) |
|
int | scannum (char *str) |
|
int | cieq (char *p, char *s) |
|
int | ciprefix (char *p, char *s) |
|
void | strtolower (char *str) |
|
char * | gettok (char **s) |
|
int | copytok (char *dst, char **s) |
|
int | copytok1 (char *dst, char **s) |
|
void | advtok (char **s) |
|
char * | index (char *s, char c) const |
|
char * | rindex (char *s, char c) const |
|
void | bcopy (char *from, char *to, int num) |
|
int | bzero (char *ptr, int num) |
|
| qsort () |
|
Definition at line 266 of file string.c.
278 while (**
s && !isspace(**
s))
void appendc |
( |
char * |
s, |
|
|
char |
c |
|
) |
| |
void bcopy |
( |
char * |
from, |
|
|
char * |
to, |
|
|
int |
num |
|
) |
| |
int bzero |
( |
char * |
ptr, |
|
|
int |
num |
|
) |
| |
int cieq |
( |
char * |
p, |
|
|
char * |
s |
|
) |
| |
Definition at line 126 of file string.c.
133 if ((isupper(*
p) ? tolower(*
p) : *
p) !=
134 (isupper(*
s) ? tolower(*
s) : *
s))
139 return (*s ?
false :
true);
int ciprefix |
( |
char * |
p, |
|
|
char * |
s |
|
) |
| |
Definition at line 148 of file string.c.
155 if ((isupper(*
p) ? tolower(*
p) : *
p) !=
156 (isupper(*
s) ? tolower(*
s) : *
s))
int copytok |
( |
char * |
dst, |
|
|
char** |
s |
|
) |
| |
Definition at line 215 of file string.c.
225 while (**
s && !isspace(**
s))
int copytok1 |
( |
char * |
dst, |
|
|
char** |
s |
|
) |
| |
Definition at line 241 of file string.c.
251 while (**
s && !isspace(**
s))
char* gettok |
( |
char ** |
s | ) |
|
Definition at line 187 of file string.c.
200 while (**
s && !isspace(**
s))
static char buf[MAXPROMPT]
char* index |
( |
char * |
s, |
|
|
char |
c |
|
) |
| const |
Definition at line 294 of file string.c.
299 while ((*
s !=
c) && (*
s !=
'\0'))
int prefix |
( |
char * |
p, |
|
|
char * |
s |
|
) |
| |
Definition at line 21 of file string.c.
27 while (*
p && (*
p == *
s))
char* rindex |
( |
char * |
s, |
|
|
char |
c |
|
) |
| const |
Definition at line 313 of file string.c.
320 for (t = (
char*)
s; *t !=
'\0'; t++);
321 while ((*t !=
c) && (t != (
char*)
s))
int scannum |
( |
char * |
str | ) |
|
Definition at line 108 of file string.c.
115 while (isdigit(*str))
116 i = i * 10 + *(str++) -
'0';
void strtolower |
( |
char * |
str | ) |
|
Definition at line 170 of file string.c.
176 *str = tolower(*str);
int substring |
( |
char * |
sub, |
|
|
char * |
str |
|
) |
| |
Definition at line 60 of file string.c.
70 for (s = sub; *s; s++) {
71 if (!*str || (*s != *str++))