Class: String

Inherits:
Object show all
Defined in:
lib/citysdk/util.rb

Instance Method Summary collapse

Instance Method Details

#remove_non_asciiObject



5
6
7
# File 'lib/citysdk/util.rb', line 5

def remove_non_ascii
  self.encode( "UTF-8", "binary", :invalid => :replace, :undef => :replace, :replace => 'ยง')
end

#starts_with?(aString) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/citysdk/util.rb', line 8

def starts_with?(aString)
  index(aString) == 0
end