Split string in array:
Code:
function splitString(str,sep,arr)
local(i,pos) (
i=pos=0;
#reg="%S";
#reg+=sep;
#reg+="*";
string_pos+=1;
len=strlen(str);
while (match(#reg,strcpy_from(#,str,pos),string_pos) && i<555) (
arr[i]=string_pos;
pos+=strlen(string_pos)+1;
i+=1;
string_pos+=1;
);
pos>0 ? arr[i]=strcpy_from(string_pos,str,pos);
);
arr1=0;
splitString("C;C#;D;D#;E;F;F#;G;G#;A;A#;B",";",arr1);