With nullterminated strings (char arrays) always use the strstr() function to find a nullterminated string and its position within another nullterminated string.
so I am looking for an operation to convert "buffer" to a string bufferString, so I can use the .indexOf method.
Not going to help you with that. There are functions to determine if a string (a NULL terminated array of chars) contains a string. Use them, instead. ANY book on C will show all of the string handling functions, so you never need to use the String crutches again.