Removing 2 Digits From First Of A Label



  • 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



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



  • @ustk Thank You Sir, Let Me Try It 🙂



  • @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();
    

Log in to reply
 

21
Online

1.5k
Users

4.6k
Topics

42.1k
Posts