Mega Code Archive

 
Categories / Ruby / String
 

Check the length of a string which has the control character inside

french_string = "il \xc3\xa9tait une fois"   # => "il \303\251tait une fois" french_string.length                         # => 18