[Tarantool-patches] [PATCH 1/2] Allow leading and trailing whitespaces in FromString
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Thu Jun 11 20:06:49 MSK 2020
Hi! Thanks for the patch!
I am afraid this may be a dead end. You didn't check for tabs, new lines,
\r, and whatever else can be treated as a whitespace. Moreover, for some other
code it may be necessary not to skip whitespaces. Why can't you trim whitespace
symbols in SQL code? sql_atoi64(), for example, trims them, before calling
strtoll()/strtoull().
To trim right spaces you could make this function return a position where
did it stop, so as to ensure that all the rest is whitespaces, in SQL code.
That also would be consistent with strtoll()/strtoull().
More information about the Tarantool-patches
mailing list