substr function trim
I'm using substr function to create a string at "save to disk" template.
I use substr(raw_field('title'),0,40) and works fine.... but when the last character is a space, it disapears (it seems like it's doing a trim).
Maybe it's a bug, or this is normal?
For example, for the title 'This is a simple title example', substr(raw_field('title',0,12) returns 'This is a si' (correct), but substr(raw_field('title',0,10) returns 'This is a' (and the correct is 'This is a ').
|