HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/gems/ruby-3.0.2/doc/activesupport-6.1.4.1/ri/String/at-i.ri
U:RDoc::AnyMethod[iI"at:ETI"String#at;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"PIf you pass a single integer, returns a substring of one character at that ;TI"Oposition. The first character of the string is at position 0, the next at ;TI"Kposition 1, and so on. If a range is supplied, a substring containing ;TI"Pcharacters at offsets given by the range is returned. In both cases, if an ;TI"Qoffset is negative, it is counted from the end of the string. Returns +nil+ ;TI"Pif the initial offset falls outside the string. Returns an empty string if ;TI"Fthe beginning of the range is greater than the end of the string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;	[I"str = "hello"
;TI"str.at(0)      # => "h"
;TI"str.at(1..3)   # => "ell"
;TI"str.at(-2)     # => "l"
;TI"str.at(-2..-1) # => "lo"
;TI"str.at(5)      # => nil
;TI"str.at(5..-1)  # => ""
;T:@format0o;
;	[I"KIf a Regexp is given, the matching portion of the string is returned. ;TI"IIf a String is given, that given string is returned if it occurs in ;TI"Gthe string. In both cases, +nil+ is returned if there is no match.;T@o;;	[
I"str = "hello"
;TI"str.at(/lo/) # => "lo"
;TI"str.at(/ol/) # => nil
;TI"str.at("lo") # => "lo"
;TI"str.at("ol") # => nil;T;
0:
@fileI"1lib/active_support/core_ext/string/access.rb;T:0@omit_headings_from_table_of_contents_below000[I"(position);T@*FI"String;TcRDoc::NormalClass00