aryan87
aryan87

Reputation: 119

In Action Script: How can I search a substring in a string and then truncate the characters that follow my substring

In Action Script: How can I search a substring in a string and then truncate the characters that follow my substring?

Upvotes: 1

Views: 176

Answers (1)

Vesper
Vesper

Reputation: 18747

String.indexOf(substring) will return you the first part, String.slice() with parameters will let you truncate your string. The manual

Upvotes: 4

Related Questions