Skip to main content
fzl_rshd
Inspiring
Jan 3, 2023 10:11 PM UTC
Question

Help me plzzz... how i remove after "-" in as3

example:

trace("mynameis-daffa");
// i wanna remove after "-string" to
trace("mynameis");
This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

kglad
Community Expert
Community Expert
Jan 3, 2023 10:24 PM UTC

use split("-").join()[0]

Translate
fzl_rshd
fzl_rshdAuthor
Inspiring
Jan 3, 2023 10:30 PM UTC

no, i wanna remove after "-" to end line, so when typing "en-US" is changed to "en" on output code

Translate
kglad
Community Expert
Community Expert
Jan 3, 2023 10:33 PM UTC

and i gave the code to do that.

Translate