Languages
[Edit]
EN

TypeScript - split string by hyphen sign (minus sign - ascii 45 code)

0 points
Created by:
Dollie-Rutledge
806

In this article, we would like to show you how to split string by hyphen sign in TypeScript.

String split() function takes as parameter character by which the string will be split into an array of substrings. As the result of String split() we get an array. To access an element we just get an element by its index.

Practical example

Edit

Output:

Alternative titles

  1. TypeScript - how to split string by hyphen sign (minus sign - ascii 45 code)
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