Wednesday 25 November 2020

For a same String, will SQLite's length will ever return a different value than Java's length method?

Give a same String data

  1. SQLite perform length calculation on its TEXT column.
  2. The TEXT column is read into (Using Android Room database) Java String, then Java performs String.length()

Is there any chance that these yields 2 different value?

I have do a rough test using English and non-English characters. Both yields the same value.

But, I am not sure whether there is any edge cases I have missed out?



from For a same String, will SQLite's length will ever return a different value than Java's length method?

No comments:

Post a Comment