D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
MatchData
/
Filename :
bytebegin-i.ri
back
Copy
U:RDoc::AnyMethod[iI"bytebegin:ETI"MatchData#bytebegin;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"KReturns the offset (in bytes) of the beginning of the specified match.;To:RDoc::Markup::BlankLine o; ; [I"6When non-negative integer argument +n+ is given, ;TI"Creturns the offset of the beginning of the <tt>n</tt>th match:;T@o:RDoc::Markup::Verbatim; [I"-m = /(.)(.)(\d+)(\d)/.match("THX1138.") ;TI":# => #<MatchData "HX1138" 1:"H" 2:"X" 3:"113" 4:"8"> ;TI"m[0] # => "HX1138" ;TI"m.bytebegin(0) # => 1 ;TI"m[3] # => "113" ;TI"m.bytebegin(3) # => 3 ;TI" ;TI"*m = /(т)(е)(с)/.match('тест') ;TI"5# => #<MatchData "тес" 1:"т" 2:"е" 3:"с"> ;TI"m[0] # => "тес" ;TI"m.bytebegin(0) # => 0 ;TI"m[3] # => "с" ;TI"m.bytebegin(3) # => 4 ;T:@format0o; ; [I"5When string or symbol argument +name+ is given, ;TI"=returns the offset of the beginning for the named match:;T@o;; [I"/m = /(?<foo>.)(.)(?<bar>.)/.match("hoge") ;TI"-# => #<MatchData "hog" foo:"h" bar:"g"> ;TI"m[:foo] # => "h" ;TI"m.bytebegin('foo') # => 0 ;TI"m[:bar] # => "g" ;TI"m.bytebegin(:bar) # => 2 ;T; 0o; ; [I"6Related: MatchData#byteend, MatchData#byteoffset.;T: @fileI" re.c;T:0@omit_headings_from_table_of_contents_below0I"8bytebegin(n) -> integer bytebegin(name) -> integer ;T0[ I" (p1);T@1FI"MatchData;TcRDoc::NormalClass00