pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:4454:    *! different syntaxes do different things as follows:    *!    *! If all the arguments are strings, a copy of @[s] with every    *! occurrence of @[from] replaced with @[to] will be returned.    *! Special case: @[to] will be inserted between every character in    *! @[s] if @[from] is the empty string.    *!    *! If the first argument is a string, and the others array(string), a string    *! with every occurrance of @[from][@i{i@}] in @[s] replaced with    *! @[to][@i{i@}] will be returned. Instead of the arrays @[from] and @[to] -  *! a mapping equvivalent to @expr{@[mkmapping](@[from], @[to])@} can be +  *! a mapping equivalent to @expr{@[mkmapping](@[from], @[to])@} can be    *! used.    *!    *! If the first argument is an array or mapping, the values of @[a] which    *! are @[`==()] with @[from] will be replaced with @[to] destructively.    *! @[a] will then be returned.    *!    *! @note    *! Note that @[replace()] on arrays and mappings is a destructive operation.    */   PMOD_EXPORT void f_replace(INT32 args)