Languages
[Edit]
EN

TypeScript - get substring after word

0 points
Created by:
cory
1756

In this article, we would like to show you how to get substring after word in TypeScript.

1. Using slice() method

Edit

In this example, we use indexOf() method to get the index of a word substring. Then we use slice() to get the substring from index + length index to the end of the text string.

2. Using split() with pop() method

Edit

In this example, we split the text by the word and get the part after it using pop() method.

See also

Edit
  1. JavaScript - get substring after word
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join