pike.git / lib / modules / String.pmod

version» Context lines:

pike.git/lib/modules/String.pmod:13:   constant SplitIterator = __builtin.string_split_iterator;   constant Replace = __builtin.multi_string_replace;   constant SingleReplace = __builtin.single_string_replace;      /*    * Implode an array of strings to an english 'list'    * ie. ({"foo","bar","gazonk"}) becomes "foo, bar and gazonk"    */      //! This function implodes a list of words to a readable string. - //! If the separator is omitted, the default is <tt>"and"</tt>. + //! If the separator is omitted, the default is @tt{"and"@}.   //! If the words are numbers they are converted to strings first.   //!   //! @seealso   //! @[`*()]   //!   string implode_nicely(array(string|int|float) foo, string|void separator)   {    if(!separator) separator="and";    foo=(array(string))foo;    switch(sizeof(foo))
pike.git/lib/modules/String.pmod:197:    return fuzz;   }      //! This function compares two strings using a fuzzy matching   //! routine. The higher the resulting value, the better the strings match.   //!   //! @seealso   //! @[Array.diff()], @[Array.diff_compare_table()]   //! @[Array.diff_longest_sequence()]   //! - int fuzzymatch(string a, string b) + int(0..100) fuzzymatch(string a, string b)   {    int fuzz;       if(a == b)    {    fuzz = 100;    } else {    fuzz = low_fuzzymatch(a, b);    fuzz += low_fuzzymatch(b, a);    fuzz = fuzz*100/(strlen(a)+strlen(b));