Sha256: ed0dbd374901a644748b1c6520142620f5a87dffe50e4384a5c0a3de1b77eacd

Contents?: true

Size: 1.32 KB

Versions: 12

Compression:

Stored size: 1.32 KB

Contents

o:$YARD::CodeObjects::MethodObject:@scope:
instance:@visibility:public:
@pathI"String#setbyte:EF:@parameters[:@files[[I"
string.c;T0:@current_file_has_commentsF:
@name:setbyte:@source_type:c:
@tags[:@docstringIC:YARD::Docstring"4modifies the <i>index</i>th byte as <i>int</i>.;F:@objectIu:YARD::StubProxyString#setbyte;F:
@summary0:@ref_tags[;[o:YARD::Tags::OverloadTag
:@tag_nameI"
overload;F:
@text0;;:@types0:@signatureI"setbyte(index, int);F;IC;";F;Iu;String#setbyte;F;0;[;[o:YARD::Tags::Tag
;I"return;F;I";F;0;[I"Integer;F;0:	@allI"@return [Integer];F;[[:
index0[:int0;Iu;String#setbyte;F; I"hmodifies the <i>index</i>th byte as <i>int</i>.


@overload setbyte(index, int)
  @return [Integer];F:@namespaceIu;String;F:@docstring_extra0:@sourceI"õ/*
 *  call-seq:
 *     str.setbyte(index, int) -> int
 *
 *  modifies the <i>index</i>th byte as <i>int</i>.
 */
static VALUE
rb_str_setbyte(VALUE str, VALUE index, VALUE value)
{
    long pos = NUM2LONG(index);
    int byte = NUM2INT(value);

    rb_str_modify(str);

    if (pos < -RSTRING_LEN(str) || RSTRING_LEN(str) <= pos)
        rb_raise(rb_eIndexError, "index %ld out of string", pos);
    if (pos < 0)
        pos += RSTRING_LEN(str);

    RSTRING_PTR(str)[pos] = byte;

    return value;
};F

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pry-doc-0.4.4 lib/pry-doc/core_docs_19/objects/String/setbyte_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_19/objects/String/setbyte_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_19/objects/String/setbyte_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_19/objects/String/setbyte_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_19/objects/String/setbyte_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_19/objects/String/setbyte_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_19/objects/String/setbyte_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_19/objects/String/setbyte_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_19/objects/String/setbyte_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_19/objects/String/setbyte_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_19/objects/String/setbyte_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_19/objects/String/setbyte_i.dat