Bug report with variables containing only space characters

A forum dedicated to George scripting questions
Post Reply
User avatar
aAntin
Posts: 29
Joined: 29 Aug 2007, 09:40
Location: France
Contact:

Bug report with variables containing only space characters

Post by aAntin »

Hi there,

I've noticed something that seems to be a very annoying bug with variables containing only space characters.

Code: Select all

str = " " // a String containing 1 or more space character(s)
wrap(" ") // expectedly returns " "
wrap(str) // unexpectedly returns 0

FUNCTION wrap(str)
    RETURN str
END
Going deeper:

Code: Select all

str = " "" // a String containing 1 or more space character(s)
FindString("Lorem ipsum dolor sit amet",str,1) // should return 6; unexpectedly returns 0
Replace("Lorem ipsum dolor sit amet",str,"_") // should return "Lorem_ipsum_dolor_sit_amet"; unexpectedly returns "Lorem ipsum dolor sit amet"
Is there a reason for such a behavior? Or is it something that could be fixed, please?

Thanks! :)
Post Reply