View Single Post
Old 08-14-2012, 01:53 AM   #1
Pepin33
Zealot
Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.
 
Posts: 109
Karma: 419
Join Date: Aug 2012
Location: Spain
Device: Kindle Touch
Exclamation 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 ').
Pepin33 is offline   Reply With Quote