• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • The Hive's 34th Texturing Contest: Void is now concluded, time to vote for your favourite set of icons! Click here to vote!

Maximum String Length

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,296
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