HISE Logo Forum
    • Categories
    • Register
    • Login

    String.trim() doesn't work?

    Scheduled Pinned Locked Moved Bug Reports
    3 Posts 2 Posters 137 Views
    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.
    • ustkU
      ustk
      last edited by

      Is it only me?

      var trimTest = "Remove The Spaces Please";
      trimTest = trimTest.trim();
      

      returns the same unchanged string... 🙄

      Can't help pressing F5 in the forum...

      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        Read the docs ;)

        var trimTest = " 12345 ";
        trimTest = trimTest.trim();
        
        Console.print(trimTest.length);
        

        Use replace for what you want.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        ustkU 1 Reply Last reply Reply Quote 1
        • ustkU
          ustk @d.healey
          last edited by

          @d-healey It was a test to see if your mind's still sharp 🤣
          Read the doc? and I wouldn't have the honor to speak to you :)
          Thanks a lot, I totally overlooked this one...

          Can't help pressing F5 in the forum...

          1 Reply Last reply Reply Quote 1
          • First post
            Last post

          29

          Online

          1.8k

          Users

          12.0k

          Topics

          104.6k

          Posts