diff options
author | chatty | 1993-11-29 12:27:53 +0000 |
---|---|---|
committer | chatty | 1993-11-29 12:27:53 +0000 |
commit | e5f0d6b7be619c88fe22b6a8e4f306cea6381f01 (patch) | |
tree | 792e196aed7839f9b65c2a26d2a9a447b610860a | |
parent | dc133f98ca4890fdf032f879cbb692d19dbffe73 (diff) | |
download | ivy-league-e5f0d6b7be619c88fe22b6a8e4f306cea6381f01.zip ivy-league-e5f0d6b7be619c88fe22b6a8e4f306cea6381f01.tar.gz ivy-league-e5f0d6b7be619c88fe22b6a8e4f306cea6381f01.tar.bz2 ivy-league-e5f0d6b7be619c88fe22b6a8e4f306cea6381f01.tar.xz |
Replaced index with strchr
-rw-r--r-- | comm/OLD/TextStream.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/comm/OLD/TextStream.cc b/comm/OLD/TextStream.cc index 117c3ae..65f461c 100644 --- a/comm/OLD/TextStream.cc +++ b/comm/OLD/TextStream.cc @@ -140,11 +140,11 @@ UchTextWord :: GetQuotes () const return ""; /* no quotes */ if (! *Sval) return "\'\'"; /* empty string */ - if (index (Sval, ' ') == 0) + if (strchr (Sval, ' ') == 0) return ""; /* no quotes */ - if (index (Sval, '\'') == 0) + if (strchr (Sval, '\'') == 0) return "\'\'"; /* 'hello' */ - if (index (Sval, '\"') == 0) + if (strchr (Sval, '\"') == 0) return "\"\""; /* "hello" */ return 0; /* cannot quote */ } @@ -211,7 +211,7 @@ UchTextLine :: Parse (char* line) for (; *s; s++) { switch (where) { case IN_WORD: - if (index (" \t(),", *s)) { + if (strchr (" \t(),", *s)) { *s = '\0'; where = IN_SPACE; AddWord (word); @@ -231,7 +231,7 @@ UchTextLine :: Parse (char* line) where = IN_QUOTE; word = s+1; } else - if (index (" \t(),", *s)) { + if (strchr (" \t(),", *s)) { *s = '\0'; } else { where = IN_WORD; |