Method: XML::DOM::CharacterData#substringData

Defined in:
lib/xml/dom/core.rb,
lib/xml/dom2/characterdata.rb

#substringData(start, count) ⇒ Object

DOM


2344
2345
2346
2347
2348
2349
2350
2351
# File 'lib/xml/dom/core.rb', line 2344

def substringData(start, count)
  if start < 0 || start > @value.length || count < 0
    raise DOMException.new(DOMException::INDEX_SIZE_ERR)
  end
  ## if the sum of start and count > length,
  ##  return all characters to the end of the value.
  @value[start, count]
end