Method: Scanf::FormatSpecifier#mid_match?
- Defined in:
- lib/scanf.rb
#mid_match? ⇒ Boolean
478 479 480 481 482 483 484 485 |
# File 'lib/scanf.rb', line 478 def mid_match? return false unless @matched cc_no_width = letter == '[' &&! width c_or_cc_width = (letter == 'c' || letter == '[') && width width_left = c_or_cc_width && (matched_string.size < width) return width_left || cc_no_width end |