Our help regarding String type and related functions (e.g., Mid) needs clarifications: 1. There's no mention that indexing of characters starts from 1. (This may be confusing, when users don't see the difference between UNO API, where normal is 0-based indexing, and BASIC functions.) 2. There are multiple mentions of "max characters is 65535". This is wrong; actually, strings may be as long as 2G characters. See e.g.: https://help.libreoffice.org/7.0/en-US/text/sbasic/shared/01020100.html#hd_id3148742 https://help.libreoffice.org/7.0/en-US/text/sbasic/shared/03120306.html
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/1476465fc35ec2162a513ebc668fed82ed77397b tdf#136213 Basic string functions update