# String Equal
Grammar — s1 is equal to s2 (sens|Sensitive/Insensitive to case)
Flags —Native
|Function
Returns true if the two strings are the same.
# Arguments
string
— String 1string
— String 2bool
<preset::String_Case_Sensitivity> — Sensitivity
Returns — bool
native bool StringEqual(
string s1,
string s2,
bool caseSens,
);
# Related
Category: String / Comparisons
- String Equal —
bool
— StringEqual - String Compare —
int
— StringCompare - String Length —
int
— StringLength
# Examples
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:4305
}
if (!((StringEqual(StringWord(EventChatMessage(false), 1), EventChatMessage(true), c_stringNoCase) == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:7965
lv_states = libCamp_gf_StoryModeRoomStates();
lv_index = gf_RoomStatesIndex(lp_stateType, lp_room);
return StringEqual(StringSub(lv_states, lv_index, lv_index), "1", c_stringCase);
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:18661
}
if (!((StringEqual(StringWord(EventChatMessage(false), 1), EventChatMessage(true), c_stringNoCase) == true))) {
return false;
}
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:19674
}
if (!((StringEqual(StringWord(EventChatMessage(false), 1), EventChatMessage(true), c_stringNoCase) == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2map — MapScript.galaxy:4305
}
if (!((StringEqual(StringWord(EventChatMessage(false), 1), EventChatMessage(true), c_stringNoCase) == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:7965
lv_states = libCamp_gf_StoryModeRoomStates();
lv_index = gf_RoomStatesIndex(lp_stateType, lp_room);
return StringEqual(StringSub(lv_states, lv_index, lv_index), "1", c_stringCase);
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:18661
}
if (!((StringEqual(StringWord(EventChatMessage(false), 1), EventChatMessage(true), c_stringNoCase) == true))) {
return false;
}
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2map — MapScript.galaxy:19674
}
if (!((StringEqual(StringWord(EventChatMessage(false), 1), EventChatMessage(true), c_stringNoCase) == true))) {
return false;
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/swarm/zspace01.sc2map/MapScript.galaxy:1780
}
if (!((StringEqual(StringWord(EventChatMessage(false), 1), EventChatMessage(true), c_stringNoCase) == true))) {
return false;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zspace01.sc2map — MapScript.galaxy:1780
}
if (!((StringEqual(StringWord(EventChatMessage(false), 1), EventChatMessage(true), c_stringNoCase) == true))) {
return false;
}
campaigns/swarmstory.sc2campaign — base.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:18548
lv_lastLocation = "";
}
if ((StringEqual(lv_missionInitial, lv_lastLocation, c_stringCase) == false)) {
libSwaC_gv_zSX_CamStatsMisisonOrder = (libSwaC_gv_zSX_CamStatsMisisonOrder + lv_missionInitial);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TacticalAI.galaxy:277
//--------------------------------------------------------------------------------------------------
bool AIIsAttackOrder (order o) {
return StringEqual(AbilityCommandGetAbility(OrderGetAbilityCommand(o)), c_AB_Attack, true);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TacticalAI.galaxy:284
//--------------------------------------------------------------------------------------------------
bool AIIsMoveOrder (order o) {
return StringEqual(AbilityCommandGetAbility(OrderGetAbilityCommand(o)), c_AB_Move, true);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TacticalAI.galaxy:277
//--------------------------------------------------------------------------------------------------
bool AIIsAttackOrder (order o) {
return StringEqual(AbilityCommandGetAbility(OrderGetAbilityCommand(o)), c_AB_Attack, true);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TacticalAI.galaxy:284
//--------------------------------------------------------------------------------------------------
bool AIIsMoveOrder (order o) {
return StringEqual(AbilityCommandGetAbility(OrderGetAbilityCommand(o)), c_AB_Move, true);
}