comparison src/c/urweb.c @ 831:5e1a4b12c83a

strcspn and friends
author Adam Chlipala <adamc@hcoop.net>
date Sun, 31 May 2009 12:41:34 -0400
parents 20fe00fd81da
children 249740301a0a
comparison
equal deleted inserted replaced
830:d07980bf1444 831:5e1a4b12c83a
1813 1813
1814 uw_Basis_string uw_Basis_strchr(uw_context ctx, uw_Basis_string s, uw_Basis_char ch) { 1814 uw_Basis_string uw_Basis_strchr(uw_context ctx, uw_Basis_string s, uw_Basis_char ch) {
1815 return strchr(s, ch); 1815 return strchr(s, ch);
1816 } 1816 }
1817 1817
1818 uw_Basis_int uw_Basis_strcspn(uw_context ctx, uw_Basis_string s, uw_Basis_string chs) {
1819 return strcspn(s, chs);
1820 }
1821
1818 uw_Basis_int *uw_Basis_strindex(uw_context ctx, uw_Basis_string s, uw_Basis_char ch) { 1822 uw_Basis_int *uw_Basis_strindex(uw_context ctx, uw_Basis_string s, uw_Basis_char ch) {
1819 uw_Basis_string r = strchr(s, ch); 1823 uw_Basis_string r = strchr(s, ch);
1820 if (r == NULL) 1824 if (r == NULL)
1821 return NULL; 1825 return NULL;
1822 else { 1826 else {