8-Nov-07 (Created: 8-Nov-07) | More in 'CS-Java'

walking through a "string" full of characters: StringCharacterIterator

private int getNumberOfParameters(String ps)
   {
   		int count=0;
   		StringCharacterIterator sci = new StringCharacterIterator(ps);
   		for(char c=sci.first();c != CharacterIterator.DONE; sci.next())
   		{
   			if (c == '?')
   			{
   				count++;
   			}
   		}
   		return count;
   }//eof-function