04.03.2014, 15:58
The example you gave is: "Ance_Zas: Prisijunges". The code I wrote will return "Ance_Zas" but you search for " -" and you never check if it was found or not. In case " -" doesn't exist in the inputtext, the length will be 0 and msg will not hold the name.