Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Explorer ,
Jan 03, 2023 Jan 03, 2023

example:

trace("mynameis-daffa");
// i wanna remove after "-string" to
trace("mynameis");
TOPICS
ActionScript , Code , How to
227
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 03, 2023 Jan 03, 2023

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 03, 2023 Jan 03, 2023

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 03, 2023 Jan 03, 2023
LATEST

and i gave the code to do that.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines