remove()function to remove characters

remove()function to remove characters

Hi there,

I'm trying to use the remove function to remove characters from a variable. I have a Lead source that comes in as [Google] or [Facebook] etc. in Flow I need te to remove the square bracket. Tried a function that looks something like this:

  1. string sourceType(string leadSource )
  2. {
  3. input.leadSource = (input.Number).remove( "[]");
  4. info leadSource ;
  5. }
However, this gives an error and I can't find where I'm making a mistake. I'm not very proficient with Deluge though.

Any help would be much appreciated.
Many Thanks