HISE Logo Forum
    • Categories
    • Register
    • Login

    Help with .contains please.

    Scheduled Pinned Locked Moved Solved Scripting
    2 Posts 1 Posters 68 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.
    • ChazroxC
      Chazrox
      last edited by

      Im trying to figure out how to subtract from a list of audio files, the files that contain "SUB_" because its showing up in my reverb combobox.

      this is the original line that adds the items. I want it to subtract any file with prefix "SUB_".

      		for (x in irs)	
      		cmbIr.addItem(x.replace("{PROJECT_FOLDER}").replace(".wav").replace(".WAV").replace(".aif"));		
      		
      
      ChazroxC 1 Reply Last reply Reply Quote 0
      • ChazroxC Chazrox marked this topic as a question on
      • ChazroxC
        Chazrox @Chazrox
        last edited by Chazrox

        I got it. I dont know why it didnt work the first time...

        		for (x in irs)
        		{
        			if (!x.contains("SUB_"))
        			{
        				cmbIr.addItem(x.replace("{PROJECT_FOLDER}").replace(".wav").replace(".WAV").replace(".aif"));						
        			}			
        		}
        

        Leaving this here for the next lost soul.

        1 Reply Last reply Reply Quote 0
        • ChazroxC Chazrox has marked this topic as solved on
        • First post
          Last post

        15

        Online

        1.7k

        Users

        11.8k

        Topics

        103.1k

        Posts