method

new

new(p1, p2 = v2)
public

Creates a new StringScanner object to scan over the given string. dup argument is obsolete and not used now.