Dim components() As String
' components = Regex.Split("", "1234")
components = Regex.Split("(?<=.)", "1234")
Log("Length: " & components.Length)
For i = 0 To components.Length - 1
Log("Component " & components(i))
Next
Yes, same code, different behaviors.
It depends on the android version.
on a device ( all real device ) with:
Android 8 I have the 5 values (wrong)
Android 11 is fixed
Android 13 is fixed
Found the answer on stackoverflow. The behavior when dealing with an empty String pattern has changed between Java 7 and Java 8. Depending on the version of Android, you may be dealing with Java 6, 7 or 8. This has nothing to do with the with the JDK you use in B4A to generate you APK, but with the Java implemented within Android.
@HoangHuynh you may use JDK 6 or above for Android development. However, the compilation supports Java version 6 (and 7 in case of KitKat). I think what the OP meant is also for java version (not JDK)
– waqaslam Apr 27, 2014 at 1:01
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.