pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:3152:
p = (char*)p+(index<<shift); if (!shift) *(p_wchar0*)p = ch; else if(shift==1) *(p_wchar1*)p = ch; else *(p_wchar2*)p = ch; push_int(ch); }
-
/*! @decl
String.
Buffer `+( string|
String.
Buffer what )
+
/*! @decl Buffer `+( string|Buffer what )
*/ PIKEFUN object `+( string|Buffer what ) rawtype tFunc(tOr(tString, tObjIs_BUFFER), tObjIs_BUFFER); { struct Buffer_struct *str = THIS, *str2; struct object *res = fast_clone_object( Buffer_program ); str2 = OBJ2_BUFFER( res ); str2->initial = str->initial; if( str->str.s ) init_string_builder_copy (&str2->str, &str->str); if( (Pike_fp->current_object->flags & OBJECT_CLEAR_ON_EXIT) ) res->flags |= OBJECT_CLEAR_ON_EXIT; apply( res, "add", 1 ); RETURN res; }
-
/*! @decl
String.
Buffer `+=( string|
String.
Buffer what )
+
/*! @decl Buffer `+=( string|Buffer what )
*/ PIKEFUN object `+=( string|Buffer what ) rawtype tFunc(tOr(tString, tObjIs_BUFFER), tObjIs_BUFFER); { f_Buffer_add( 1 ); REF_RETURN Pike_fp->current_object; }
-
/*! @decl int addat(int(0..) pos, string|
String.
Buffer ... data)
+
/*! @decl int addat(int(0..) pos, string|Buffer ... data)
*! *! Adds @[data] to the buffer, starting at position @[pos]. *! It overwrites existing content at that offset, never truncates the *! buffer, possibly extends the buffer if the new content does not fit. *! *! @returns *! Returns the size of the buffer. *! *! @note *! If the starting position @[pos] extends beyond the end of the current *! buffer content, the gap will be filled with NUL-characters. *! *! @seealso *! @[add()] */
-
PIKEFUN int addat(int(0..) pos, string ... arg1 )
+
PIKEFUN int addat(int(0..) pos, string
|Buffer
... arg1 )
rawtype tFuncV(tIntPos, tOr(tString, tObjIs_BUFFER), tIntPos); { struct Buffer_struct *str = THIS; struct pike_string *s; ptrdiff_t sum = 0; int j,shift = 0; if (pos < 0) SIMPLE_BAD_ARG_ERROR("addat", 1, "int(0..)");
pike.git/src/builtin.cmod:3261:
} if (s->len < pos) { s->len = pos; s->str[s->len << s->size_shift] = 0; // Ensure NUL-termination } RETURN s->len; }
-
/*! @decl int add(string|
String.
Buffer ... data)
+
/*! @decl int add(string|Buffer ... data)
*! *! Adds @[data] to the buffer. *! *! @returns *! Returns the size of the buffer. *! *! @seealso *! @[addat()] */ PIKEFUN int add( string|Buffer ... arg1 )