pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:1:
/* -*- c -*- || 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.cmod,v 1.
127
2003/
03
/
14
17
:
19
:
52
grubba
Exp $
+
|| $Id: builtin.cmod,v 1.
128
2003/
04
/
01
18
:
09
:
15
nilsson
Exp $
*/ #include "global.h" #include "interpret.h" #include "svalue.h" #include "opcodes.h" #include "pike_macros.h" #include "object.h" #include "program.h" #include "array.h"
pike.git/src/builtin.cmod:251:
} } RETURN end_shared_string(s); } /*! @decl array column(array data, mixed index) *! *! Extract a column from a two-dimensional array. *! *! This function is exactly equivalent to:
-
*!
@code{map
(@[data], lambda(mixed x,mixed y) { return x[y]; }, @[index])
@}
+
*!
@code
+
*! map
(@[data], lambda(mixed x,mixed y) { return x[y]; }, @[index])
+
*! @endcode
*! *! Except of course it is a lot shorter and faster. *! That is, it indices every index in the array data on the value of *! the argument index and returns an array with the results. *! *! @seealso *! @[rows()] */ PIKEFUN array column(array data, mixed index) efun;
pike.git/src/builtin.cmod:1557:
*! There is a reason for those seemingly rather odd limitations, *! it makes it possible to do some optimizations that really speed *! things up. *! *! You do not need to use this class unless you add very many *! strings together, or very large strings. *! *! @example *! For the fastest possible operation, write your code like this: *!
-
*!
@code{
-
*!
String.Buffer b = String.Buffer( );
+
*!
@code
+
*! String.Buffer b = String.Buffer( );
*!
-
*!
function add = b->add;
+
*! function add = b->add;
*!
-
*!
.. call add several times in code ...
+
*! .. call add several times in code ...
*!
-
*!
string result = b->get(); // also clears the buffer
-
*!
@}
+
*! string result = b->get(); // also clears the buffer
+
*!
@endcode
*/ PIKECLASS Buffer { CVAR struct string_builder str; CVAR int initial; void f_Buffer_get_copy( INT32 args ); void f_Buffer_get( INT32 args ); void f_Buffer_add( INT32 args );