jl5501 Posted May 27, 2010 Share Posted May 27, 2010 Hi It seems to me that if trim() is fed a string that consists only of a single space, then it returns it unaltered. Is that generally the case, and is that meant to happen? Link to comment https://forums.phpfreaks.com/topic/203114-trim-question/ Share on other sites More sharing options...
ChaosKnight Posted May 27, 2010 Share Posted May 27, 2010 It only changes the following: " " (ASCII 32 (0x20)), an ordinary space. "\t" (ASCII 9 (0x09)), a tab. "\n" (ASCII 10 (0x0A)), a new line (line feed). "\r" (ASCII 13 (0x0D)), a carriage return. "\0" (ASCII 0 (0x00)), the NUL-byte. "\x0B" (ASCII 11 (0x0B)), a vertical tab. Link to comment https://forums.phpfreaks.com/topic/203114-trim-question/#findComment-1064242 Share on other sites More sharing options...
PFMaBiSmAd Posted May 27, 2010 Share Posted May 27, 2010 It trims a string consisting of a single space and returns a empty string. The character must be something else or your code has an error in it and it is not using the actual value being returned. Link to comment https://forums.phpfreaks.com/topic/203114-trim-question/#findComment-1064248 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.