next up previous contents index
suivant: Concat objects into a monter: Strings précédent: String defined by the   Table des matières   Index


Find a character in a string : inString

inString takes two arguments : a string S and a character c.
inString tests if the character c is in the string S.
inString returns "the index of its first occurence" or -1 if c is not in S.
Input :
inString("abcded","d")
Output :
3
Input :
inString("abcd","e")
Output :
-1



giac documentation written by Renée De Graeve and Bernard Parisse