From e5f0d6b7be619c88fe22b6a8e4f306cea6381f01 Mon Sep 17 00:00:00 2001 From: chatty Date: Mon, 29 Nov 1993 12:27:53 +0000 Subject: Replaced index with strchr --- comm/OLD/TextStream.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'comm/OLD') 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; -- cgit v1.1