D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
StringScanner
/
Filename :
scan_until-i.ri
back
Copy
U:RDoc::AnyMethod[iI"scan_until:ETI"StringScanner#scan_until;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"7call-seq: scan_until(pattern) -> substring or nil;To; ; [I"�Attempts to {match}[rdoc-ref:StringScanner@Matching] the given <code>pattern</code> anywhere (at any {position}[rdoc-ref:StringScanner@Byte+Position+-28Position-29]) in the {target substring}[rdoc-ref:StringScanner@Target+Substring].;To; ; [I"#If the match attempt succeeds:;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I">Sets {match values}[rdoc-ref:StringScanner@Match+Values].;To;;0; [o; ; [I"�Sets the {byte position}[rdoc-ref:StringScanner@Byte+Position+-28Position-29] to the end of the matched substring; may adjust the {character position}[rdoc-ref:StringScanner@Character+Position].;To;;0; [o; ; [I"#Returns the matched substring.;To:RDoc::Markup::Verbatim; [I"kscanner = StringScanner.new(HIRAGANA_TEXT) scanner.string # => "こんにちは" scanner.pos = 6 scanner.scan_until(/ち/) # => "にち" put_match_values(scanner) # Basic match values: # matched?: true # matched_size: 3 # pre_match: "こんに" # matched : "ち" # post_match: "は" # Captured match values: # size: 1 # captures: [] # named_captures: {} # values_at: ["ち", nil] # []: # [0]: "ち" # [1]: nil put_situation(scanner) # Situation: # pos: 12 # charpos: 4 # rest: "は" # rest_size: 3 ;T:@format:rbo; ; [I" If the match attempt fails:;To;;; ;[o;;0; [o; ; [I"Clears match data.;To;;0; [o; ; [I"Returns <code>nil</code>.;To;;0; [o; ; [I"Does not update positions.;To;; [I"Vscanner.scan_until(/nope/) # => nil match_values_cleared?(scanner) # => true ;T;;: @fileI"ext/strscan/strscan.c;T:0@omit_headings_from_table_of_contents_below000[ I" (p1);T@?FI"StringScanner;TcRDoc::NormalClass00