Forum

    • Register
    • Login
    • Search
    • Categories

    String.trim() doesn't work?

    Bug Reports
    2
    3
    35
    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.
    • ustk
      ustk last edited by

      Is it only me?

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

      returns the same unchanged string... 🙄

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

      1 Reply Last reply Reply Quote 0
      • d.healey
        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

        ustk 1 Reply Last reply Reply Quote 1
        • ustk
          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...

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

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

          17
          Online

          982
          Users

          6.6k
          Topics

          60.8k
          Posts