SC2Mapster.com Wiki

string represents textual data.

// 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

Note: Operators <, <=, > and >= always return true.

"a" < "A" // true
"A" < "a" // true

Note: Individual character access is not available through []

string sc2 = "sc2galaxy";
char c = sc2[1];
// Implicit cast not allowed
string c = sc2[1];
// Implicit cast not allowed

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.

Manipulating Strings

Converting Strings

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of ShakiShingi ShakiShingi Mar 25, 2010 at 00:38 UTC - 0 likes

    it should be sc2mapster not sc2galaxy xD.

    http://www.sc2pod.com/achievement.php?id=4600

  • 1 comment

Facts

Date created
Mar 10, 2010
Last updated
Mar 10, 2010

Author