SC2Mapster.com
Maps
Assets
Teams
Authors
Forums
Wiki
Paste
Sign in
Register new account
SC2Mapster.com Wiki
SC2 API
/
Types
/
string
r3
Source
Markup:
##string## represents textual data. <<code galaxy>> // String literal string website = "sc2galaxy"; // String concatenation string url = "http://www." + website + ".com/"; string sc2 = "sc2"; sc2 += "galaxy"; // "sc2galaxy" // String equality is case senstive bool eq = (website == url); // false eq = ("sc2galaxy" == "sc2" + "galaxy"); // true eq = ("SC2GALAXY" == "sc2galaxy"); // false eq = StringEqual("SC2GALAXY", "sc2galaxy", false); // true <</code>> **Note**: Operators ##<##, ##<=##, ##>## and ##>=## always return true. <<code>> "a" < "A" // true "A" < "a" // true <</code>> **Note**: Individual character access is not available through [] <<code>> string sc2 = "sc2galaxy"; char c = sc2[1]; // Implicit cast not allowed string c = sc2[1]; // Implicit cast not allowed <</code>> **Note**: There is no way to get character access or string length. Only string equality (case sensitive or not) and split into separate words are available. ===== Related Functions ===== Manipulating Strings * [[SC2 API / Functions / StringEqual | StringEqual]] * [[SC2 API / Functions / StringWord | StringWord]] Converting Strings * [[SC2 API / Functions / StringToText| StringToText]] * [[SC2 API / Functions / StringToFixed| StringToFixed]] * [[SC2 API / Functions / StringToInt| StringToInt]] * [[SC2 API / Functions / IntToString| IntToString]]
Markup Type:
The type of markup for this entry.
Click here for details
.
BBCode
Markdown
Plain Text
WikiCreole