Flowdock
method

ascii_only?

Importance_1
Ruby latest stable (v1_9_3_392) - 0 notes - Class: String
ascii_only?() public

Returns true for a string which has only ASCII characters.

"abc".force_encoding("UTF-8").ascii_only?          #=> true
"abc\u{6666}".force_encoding("UTF-8").ascii_only?  #=> false
Show source
Register or log in to add new notes.