Skip to main content
fzl_rshd
Inspiring
January 3, 2023
Question

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

  • January 3, 2023
  • 1 reply
  • 220 views

example:

trace("mynameis-daffa");
// i wanna remove after "-string" to
trace("mynameis");
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
January 3, 2023

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

fzl_rshd
fzl_rshdAuthor
Inspiring
January 3, 2023

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

kglad
Community Expert
Community Expert
January 3, 2023

and i gave the code to do that.