• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Maximum String Length

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
A string variable is a string variable. It is and probably will always be exactly 4 bytes.

If you mean maximum length of a string object then...
[Documentation] String Type
The limit for an individual string (without concatenation) is 1024 bytes.
However, you will exceed the limit (WE will crash) if you use a string of
1024 characters. This is because 1024 characters + 1 null terminator exceeds
the limit. Having 1023 characters will not crash.
Be aware the limit is in bytes and not code points. A code point can use more than 1 byte due to multi byte encoding.
 
Status
Not open for further replies.
Top