MCPcopy Index your code
hub / github.com/RustPython/RustPython / splitText

Method splitText

Lib/xml/dom/minidom.py:1110–1123  ·  view source on GitHub ↗
(self, offset)

Source from the content-addressed store, hash-verified

1108 attributes = None
1109
1110 def splitText(self, offset):
1111 if offset < 0 or offset > len(self.data):
1112 raise xml.dom.IndexSizeErr("illegal offset value")
1113 newText = self.__class__()
1114 newText.data = self.data[offset:]
1115 newText.ownerDocument = self.ownerDocument
1116 next = self.nextSibling
1117 if self.parentNode and self in self.parentNode.childNodes:
1118 if next is None:
1119 self.parentNode.appendChild(newText)
1120 else:
1121 self.parentNode.insertBefore(newText, next)
1122 self.data = self.data[:offset]
1123 return newText
1124
1125 def writexml(self, writer, indent="", addindent="", newl=""):
1126 _write_data(writer, "%s%s%s" % (indent, self.data, newl), False)

Callers

nothing calls this directly

Calls 4

lenFunction · 0.85
__class__Method · 0.45
appendChildMethod · 0.45
insertBeforeMethod · 0.45

Tested by

no test coverage detected