San Andreas has two types of strings, a short string, which is the most commonly used, this string is very limited to its length. It could contain 7 characters and the last one (8th) is a null-terminator byte. When compiling a script using a string, if it is actually shorter, the rest of bytes is filled with zero byte(s).
San Andreas scripting engine also has data type 15 that denotes the short string containing up to 15 symbols. This is not supported by any other mission editor, other than Sanny Builder. They are handled in a same manner as 8-bytes strings, but occupy 16 bytes of a SCM file.
String data Equivalent of the SCM
'MODDING' 09 4D F4 44 49 4E 47 00
'Sanny Builder' 0F 53 61 6E 6E 79 42 75 69 6C 64 65 72 00
Long strings are also seen in San Andreas, it's maximum length depends on the opcode.
Here is how the game handles with the long strings. There is a number of limits and the game sets the needed one itself for specific opcodes:
(the following numbers are real maximum without a null-terminator);
8 bytes (the smallest limit I've ever seen):
is set for the car numberplate used in 0674, 09e2
is used for the textures names: 038F, 09A9
15 bytes: is used for the opcodes that store a string into the var block memory.
For example: 06D1
also is used for the shopping item names:
For example: 087B, 075D, 075E
17 bytes: is used for the object group names.
For example: 0776, 0777, 0778; the 5th parameter of 0755;
23 bytes: is used for the animation names.
For example, 0393, 0812; the 4th parameter of 0755; the 2nd param of 075a and so on.
31 bytes: is used for the particle names.
For example: 064B, 0669, 066A and so on.
39 bytes: is used for the debug opcodes.
For example: 0660, 0661, 0662 and similar.
There was an issue of trying to pass a string to a new thread, obviously it's not just a matter of one line, but it's possible, see this post by Seemann