diff options
Diffstat (limited to 'doc/strscan/methods')
| -rw-r--r-- | doc/strscan/methods/get_byte.md | 3 | ||||
| -rw-r--r-- | doc/strscan/methods/get_charpos.md | 3 | ||||
| -rw-r--r-- | doc/strscan/methods/get_pos.md | 3 | ||||
| -rw-r--r-- | doc/strscan/methods/getch.md | 3 | ||||
| -rw-r--r-- | doc/strscan/methods/scan.md | 3 | ||||
| -rw-r--r-- | doc/strscan/methods/scan_until.md | 3 | ||||
| -rw-r--r-- | doc/strscan/methods/set_pos.md | 4 | ||||
| -rw-r--r-- | doc/strscan/methods/skip.md | 3 | ||||
| -rw-r--r-- | doc/strscan/methods/skip_until.md | 9 | ||||
| -rw-r--r-- | doc/strscan/methods/terminate.md | 3 |
10 files changed, 4 insertions, 33 deletions
diff --git a/doc/strscan/methods/get_byte.md b/doc/strscan/methods/get_byte.md index 3208d77158..775226638e 100644 --- a/doc/strscan/methods/get_byte.md +++ b/doc/strscan/methods/get_byte.md @@ -1,6 +1,3 @@ -call-seq: - get_byte -> byte_as_character or nil - Returns the next byte, if available: - If the [position][2] diff --git a/doc/strscan/methods/get_charpos.md b/doc/strscan/methods/get_charpos.md index 954fcf5b44..4de07897dc 100644 --- a/doc/strscan/methods/get_charpos.md +++ b/doc/strscan/methods/get_charpos.md @@ -1,6 +1,3 @@ -call-seq: - charpos -> character_position - Returns the [character position][7] (initially zero), which may be different from the [byte position][2] given by method #pos: diff --git a/doc/strscan/methods/get_pos.md b/doc/strscan/methods/get_pos.md index 81bbb2345e..56b1636812 100644 --- a/doc/strscan/methods/get_pos.md +++ b/doc/strscan/methods/get_pos.md @@ -1,6 +1,3 @@ -call-seq: - pos -> byte_position - Returns the integer [byte position][2], which may be different from the [character position][7]: diff --git a/doc/strscan/methods/getch.md b/doc/strscan/methods/getch.md index 3dd70e4c5b..ede1d2b071 100644 --- a/doc/strscan/methods/getch.md +++ b/doc/strscan/methods/getch.md @@ -1,6 +1,3 @@ -call-seq: - getch -> character or nil - Returns the next (possibly multibyte) character, if available: diff --git a/doc/strscan/methods/scan.md b/doc/strscan/methods/scan.md index 22ddd368b6..805c797913 100644 --- a/doc/strscan/methods/scan.md +++ b/doc/strscan/methods/scan.md @@ -1,6 +1,3 @@ -call-seq: - scan(pattern) -> substring or nil - Attempts to [match][17] the given `pattern` at the beginning of the [target substring][3]. diff --git a/doc/strscan/methods/scan_until.md b/doc/strscan/methods/scan_until.md index 9a8c7c02f6..5fb2912a1b 100644 --- a/doc/strscan/methods/scan_until.md +++ b/doc/strscan/methods/scan_until.md @@ -1,6 +1,3 @@ -call-seq: - scan_until(pattern) -> substring or nil - Attempts to [match][17] the given `pattern` anywhere (at any [position][2]) in the [target substring][3]. diff --git a/doc/strscan/methods/set_pos.md b/doc/strscan/methods/set_pos.md index 3b7abe65e3..6a43edeb41 100644 --- a/doc/strscan/methods/set_pos.md +++ b/doc/strscan/methods/set_pos.md @@ -1,7 +1,3 @@ -call-seq: - pos = n -> n - pointer = n -> n - Sets the [byte position][2] and the [character position][11]; returns `n`. diff --git a/doc/strscan/methods/skip.md b/doc/strscan/methods/skip.md index 10a329e0e4..7e924b624b 100644 --- a/doc/strscan/methods/skip.md +++ b/doc/strscan/methods/skip.md @@ -1,6 +1,3 @@ -call-seq: - skip(pattern) match_size or nil - Attempts to [match][17] the given `pattern` at the beginning of the [target substring][3]; diff --git a/doc/strscan/methods/skip_until.md b/doc/strscan/methods/skip_until.md index b7dacf6da1..a0ffab0b84 100644 --- a/doc/strscan/methods/skip_until.md +++ b/doc/strscan/methods/skip_until.md @@ -1,13 +1,11 @@ -call-seq: - skip_until(pattern) -> matched_substring_size or nil - Attempts to [match][17] the given `pattern` -anywhere (at any [position][2]) in the [target substring][3]; -does not modify the positions. +anywhere (at any [position][2]) in the [target substring][3]. If the match attempt succeeds: - Sets [match values][9]. +- Sets the [byte position][2] to the end of the matched substring; + may adjust the [character position][7]. - Returns the size of the matched substring. ```rb @@ -42,6 +40,7 @@ If the match attempt fails: - Clears match values. - Returns `nil`. +- Does not update positions. ```rb scanner.skip_until(/nope/) # => nil diff --git a/doc/strscan/methods/terminate.md b/doc/strscan/methods/terminate.md index b03b37d2a2..27f7d41cb1 100644 --- a/doc/strscan/methods/terminate.md +++ b/doc/strscan/methods/terminate.md @@ -1,6 +1,3 @@ -call-seq: - terminate -> self - Sets the scanner to end-of-string; returns +self+: |
