Your program is broken. The buffer is not being filled. You increment the index 'i' and then immediately reset it to zero every time through loop().
The only reason it has the appearance of working, is that it can just print any incoming characters.
To compare the input string with anything, it has to have a defined start and end. That is the case, no matter if you use Strings, C strings or any other kind of data representation.