Even if the input is "boy" it will still return "Kai"

I really do not understand the idea of "line ending". I don't get what that really means.