pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin_functions.c,v 1.506 2003/09/05 11:56:24 grubba Exp $ + || $Id: builtin_functions.c,v 1.507 2003/09/05 12:36:22 jhs Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.506 2003/09/05 11:56:24 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.507 2003/09/05 12:36:22 jhs Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"   #include "constants.h"   #include "mapping.h"   #include "stralloc.h"
pike.git/src/builtin_functions.c:429:    *!    *! Convert a string or character to lower case.    *!    *! @returns    *! Returns a copy of the string @[s] with all upper case characters    *! converted to lower case, or the character @[c] converted to lower    *! case.    *!    *! @note    *! Assumes the string or character to be coded according to -  *! ISO-10646 (aka Unicode). +  *! ISO-10646 (aka Unicode). If they are not, @[Locale.Charset.decoder] +  *! can do the initial conversion for you.    *!    *! @note    *! Prior to Pike 7.5 this function only accepted strings.    *!    *! @seealso -  *! @[upper_case()] +  *! @[upper_case()], @[Locale.Charset.decoder]    */   PMOD_EXPORT void f_lower_case(INT32 args)   {    ptrdiff_t i;    struct pike_string *orig;    struct pike_string *ret;       check_all_args("lower_case", args, BIT_STRING|BIT_INT, 0);       if (Pike_sp[-args].type == T_INT) {
pike.git/src/builtin_functions.c:498:    *!    *! Convert a string or character to upper case.    *!    *! @returns    *! Returns a copy of the string @[s] with all lower case characters    *! converted to upper case, or the character @[c] converted to upper    *! case.    *!    *! @note    *! Assumes the string or character to be coded according to -  *! ISO-10646 (aka Unicode). +  *! ISO-10646 (aka Unicode). If they are not, @[Locale.Charset.decoder] +  *! can do the initial conversion for you.    *!    *! @note    *! Prior to Pike 7.5 this function only accepted strings.    *!    *! @seealso -  *! @[lower_case()] +  *! @[lower_case()], @[Locale.Charset.decoder]    */   PMOD_EXPORT void f_upper_case(INT32 args)   {    ptrdiff_t i;    struct pike_string *orig;    struct pike_string *ret;    int widen = 0;    check_all_args("upper_case", args, BIT_STRING|BIT_INT, 0);       if (Pike_sp[-args].type == T_INT) {
pike.git/src/builtin_functions.c:6427:    *! @returns    *! This function returns an copy of the array @[a] with all    *! duplicate values removed. The order of the values is kept in the    *! result; it's always the first of several equal elements that is    *! kept.    *!    *! @note    *! Elements are compared with @[`==]. They are also hashed (see    *! @[lfun::__hash] for further details if the array contains    *! objects). +  *! @seealso +  *! @[group_by]    */   PMOD_EXPORT void f_uniq_array(INT32 args)   {    struct array *a, *b;    struct mapping *m;    struct svalue one;    int i, j=0,size=0;       get_all_args("uniq", args, "%a", &a);    push_mapping(m = allocate_mapping(a->size));