Sha256: 0403a7866246670c032c4240f4963b5749e70bd41c7be5677e9327067d9673af
Contents?: true
Size: 495 Bytes
Versions: 100
Compression:
Stored size: 495 Bytes
Contents
require 'strscan' module ActiveSupport #:nodoc: module CoreExtensions #:nodoc: module String #:nodoc: # Custom string iterators module Iterators # Yields a single-character string for each character in the string. # When $KCODE = 'UTF8', multi-byte characters are yielded appropriately. def each_char scanner, char = StringScanner.new(self), /./mu loop { yield(scanner.scan(char) || break) } end end end end end
Version data entries
100 entries across 100 versions & 8 rubygems