pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:150:    optflags OPT_TRY_OPTIMIZE|OPT_EXTERNAL_DEPEND;   {    if(ind->size != val->size)    bad_arg_error("mkmapping", sp-args, args, 2, "array", sp+1-args,    "mkmapping called on arrays of different sizes (%d != %d)\n",    ind->size, val->size);       RETURN mkmapping(ind, val);   }    - /*! @decl int string_count(string haystack, string needle) + /*! @decl int String.count(string haystack, string needle)    *!    *! Count the number of non-overlapping times the string @[needle] occurrs    *! in the string @[haystack].    *!    *! @seealso    *! @[search()], @[`/()]    */   PIKEFUN int string_count(string haystack, string needle)    errname String.count;    optflags OPT_TRY_OPTIMIZE;
pike.git/src/builtin.cmod:190:    j=string_search(haystack,needle,i);    if (j==-1) break;    i=j+needle->len-1;    c++;    }    break;    }    RETURN DO_NOT_WARN((INT_TYPE)c);   }    - /*! @decl string string_trim_whites (string s) + /*! @decl string String.trim_whites (string s)    *!    *! Trim leading and trailing spaces and tabs from the string @[s].    */   PIKEFUN string string_trim_whites (string s)    errname String.trim_whites;    optflags OPT_TRY_OPTIMIZE;   {    ptrdiff_t start = 0, end = s->len;    int chr;    switch (s->size_shift) {
pike.git/src/builtin.cmod:220:    } \    }    case 0: DO_IT (p_wchar0); break;    case 1: DO_IT (p_wchar1); break;    case 2: DO_IT (p_wchar2); break;   #undef DO_IT    }    RETURN string_slice (s, start, end + 1 - start);   }    - /*! @decl string string_trim_all_whites (string s) + /*! @decl string String.trim_all_whites (string s)    *!    *! Trim leading and trailing white spaces characters (space, tab,    *! newline and carriage return) from the string @[s].    */   PIKEFUN string string_trim_all_whites (string s)    errname String.trim_all_whites;    optflags OPT_TRY_OPTIMIZE;   {    ptrdiff_t start = 0, end = s->len;    int chr;
pike.git/src/builtin.cmod:314:    f_add(3);    }    return;    }    }       pop_n_elems(args);    push_int(0);   }    - /*! @decl int(8..8)|int(16..16)|int(32..32) string_width(string s) + /*! @decl int(8..8)|int(16..16)|int(32..32) String.width(string s)    *!    *! Returns the width of a string.    *!    *! Three return values are possible:    *! @int    *! @value 8    *! The string @[s] only contains characters <= 255.    *! @value 16    *! The string @[s] only contains characters <= 65535.    *! @value 32