Forum

    • Register
    • Login
    • Search
    • Categories

    Removing 2 Digits From First Of A Label

    Scripting Forum
    2
    4
    48
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Natan
      Natan last edited by

      Hey Folks
      Hope You All Having A Great Friday

      Can Someone Help Me With the An Label, I Need It To Show The Sample Map Names ( It Works Just Okey ) But I Just Want To Remove 2 Digits From The Very First Of Names?

      Here Is The Line

      Label.set("text",MapNamesArray[activeIndex][value]);
      Label.changed();
      

      Thanks For Advices

      ustk 1 Reply Last reply Reply Quote 0
      • ustk
        ustk @Natan last edited by

        @Natan String.substring(int startIndex, int endIndex)

        I cannot help pressing F5 in the forum...
        Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

        Natan 1 Reply Last reply Reply Quote 2
        • Natan
          Natan @ustk last edited by

          @ustk Thank You Sir, Let Me Try It 🙂

          1 Reply Last reply Reply Quote 0
          • Natan
            Natan last edited by Natan

            @ustk Yep 🙂 Done

                if (value)
                {
                    local items = component.get("items").split("\n");
                    local t = items[value];
                    
                    //  Without submenu name
                    local t2 = t.substring(t.indexOf(":") + 5, t.length);
                    Label.set("text", t2);
                    Console.print("Selected Item ID: " + value);
                }
                Label.changed();
            
            1 Reply Last reply Reply Quote 2
            • First post
              Last post

            12
            Online

            985
            Users

            6.6k
            Topics

            60.8k
            Posts