why does the tonumber command return a null value when the string being evaluated contains a space?
example:
string padded by a space character before the 1 returns null:
| stats count| eval test=" 1"|eval me=tonumber(test)
removing the padding returns a value:
| stats count| eval test="1"|eval me=tonumber(test)
workaround for strings with spaces:
| stats count| eval test=" 1"|eval me=trim(test)
This has been identified as a bug and is targeted to be fixed in the 6.2.5 maintenance release (~Sept/Oct 2015)
This has been identified as a bug and is targeted to be fixed in the 6.2.5 maintenance release (~Sept/Oct 2015)