src/ucx/string.h

branch
constsstr
changeset 300
d1f814633049
parent 288
6af5798342e8
child 306
90b6d69bb499
     1.1 --- a/src/ucx/string.h	Tue May 08 12:49:56 2018 +0200
     1.2 +++ b/src/ucx/string.h	Sun May 13 07:13:09 2018 +0200
     1.3 @@ -184,7 +184,6 @@
     1.4   *
     1.5   * @param count   the total number of strings to concatenate
     1.6   * @param s1      first string
     1.7 - * @param s2      second string
     1.8   * @param ...     all remaining strings
     1.9   * @return the concatenated string
    1.10   */
    1.11 @@ -200,7 +199,6 @@
    1.12   * @param a       the allocator to use
    1.13   * @param count   the total number of strings to concatenate
    1.14   * @param s1      first string
    1.15 - * @param s2      second string
    1.16   * @param ...     all remaining strings
    1.17   * @return the concatenated string
    1.18   */
    1.19 @@ -242,6 +240,13 @@
    1.20   */
    1.21  sstr_t sstrsubsl(sstr_t string, size_t start, size_t length);
    1.22  
    1.23 +scstr_t scstrsubs(scstr_t s, size_t start);
    1.24 +scstr_t scstrsubsl(scstr_t string, size_t start, size_t length);
    1.25 +
    1.26 +
    1.27 +int ucx_strchr(const char *string, size_t length, int chr, size_t *pos);
    1.28 +int ucx_strrchr(const char *string, size_t length, int chr, size_t *pos);
    1.29 +
    1.30  /**
    1.31   * Returns a substring starting at the location of the first occurrence of the
    1.32   * specified character.
    1.33 @@ -271,6 +276,9 @@
    1.34  sstr_t sstrrchr(sstr_t string, int chr);
    1.35  
    1.36  
    1.37 +scstr_t scstrchr(scstr_t string, int chr);
    1.38 +scstr_t scstrrchr(scstr_t string, int chr);
    1.39 +
    1.40  const char* ucx_strstr(
    1.41          const char *str,
    1.42          size_t length,

mercurial