Hai,
If the length of the string is unknown, you can use getcUSART() to read a single byte.
You can either write an ISR for reading bytes from UART or use the function in a loop (it should contiuously read whenever the data is ready).
The byte received should be stored to a buffer and increment the index of the buffer to store the next byte.
Data transfer can be paused, either when the buffer is full or after a timeout period.
You can compare the strings using strcmp() function,which is in string.h file