Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/motion-markdown-it/common/string.rb

Instance Method Summary collapse

Instance Method Details

#charCodeAt(ch) ⇒ Object

port of Javascript function charCodeAt




11
12
13
# File 'lib/motion-markdown-it/common/string.rb', line 11

def charCodeAt(ch)
  self[ch].ord unless self[ch].nil?
end

#slice_to_end(start) ⇒ Object

grab the remainder of the string starting at ‘start’




5
6
7
# File 'lib/motion-markdown-it/common/string.rb', line 5

def slice_to_end(start)
  self.slice(start...self.length)
end