mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
lib/scanf.rb: [DOC] fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
33f4ff71ed
commit
bb8f6ac0fe
1 changed files with 7 additions and 7 deletions
14
lib/scanf.rb
14
lib/scanf.rb
|
@ -13,7 +13,7 @@
|
|||
# scanf is an implementation of the C function scanf(3), modified as necessary
|
||||
# for Ruby compatibility.
|
||||
#
|
||||
# the methods provided are String#scanf, IO#scanf, and
|
||||
# The methods provided are String#scanf, IO#scanf, and
|
||||
# Kernel#scanf. Kernel#scanf is a wrapper around STDIN.scanf. IO#scanf
|
||||
# can be used on any IO stream, including file handles and sockets.
|
||||
# scanf can be called either with or without a block.
|
||||
|
@ -31,8 +31,8 @@
|
|||
# the conversions themselves are returned as an array.
|
||||
#
|
||||
# The format string may also contain characters other than those in the
|
||||
# conversion specifiers. White space (blanks, tabs, or newlines) in the
|
||||
# format string matches any amount of white space, including none, in
|
||||
# conversion specifiers. Whitespace (blanks, tabs, or newlines) in the
|
||||
# format string matches any amount of whitespace, including none, in
|
||||
# the input. Everything else matches only itself.
|
||||
#
|
||||
# Scanning stops, and scanf returns, when any input character fails to
|
||||
|
@ -80,7 +80,7 @@
|
|||
# see below). Otherwise, given a field width of <em>n</em> for a given
|
||||
# conversion, at most <em>n</em> characters are scanned in processing
|
||||
# that conversion. Before conversion begins, most conversions skip
|
||||
# white space in the input string; this white space is not counted
|
||||
# whitespace in the input string; this whitespace is not counted
|
||||
# against the field width.
|
||||
#
|
||||
# The following conversions are available.
|
||||
|
@ -113,17 +113,17 @@
|
|||
#
|
||||
# [s]
|
||||
# Matches a sequence of non-white-space character. The input string stops at
|
||||
# white space or at the maximum field width, whichever occurs first.
|
||||
# whitespace or at the maximum field width, whichever occurs first.
|
||||
#
|
||||
# [c]
|
||||
# Matches a single character, or a sequence of <em>n</em> characters if a
|
||||
# field width of <em>n</em> is specified. The usual skip of leading white
|
||||
# space is suppressed. To skip white space first, use an explicit space in
|
||||
# space is suppressed. To skip whitespace first, use an explicit space in
|
||||
# the format.
|
||||
#
|
||||
# [[]
|
||||
# Matches a nonempty sequence of characters from the specified set
|
||||
# of accepted characters. The usual skip of leading white space is
|
||||
# of accepted characters. The usual skip of leading whitespace is
|
||||
# suppressed. This bracketed sub-expression is interpreted exactly like a
|
||||
# character class in a Ruby regular expression. (In fact, it is placed as-is
|
||||
# in a regular expression.) The matching against the input string ends with
|
||||
|
|
Loading…
Add table
Reference in a new issue