'How to split a Text node to sub Text node with specified length?

I want to do something similar to splitText(), but with length, so if I have a Text node that contains the following string for example:

Hello please get *me* as a text node

Then only get *me* as a new Text node.

splitText() just splits into two so that's not working



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source