# Convert String Case
Grammar — String(s) as case|Lower/Upper Case
Flags —Native
|Function
Converts a string to upper case or lower case.
# Arguments
string
— Stringbool
<preset::String_Case_Option> — Case
Returns — string
native string StringCase(string s, bool upper);
# Related
Category: String / Formatting
- Convert Time To Text —
text
— TextTimeFormat - Convert String Case —
string
— StringCase - Convert Text Case —
text
— TextCase - Convert Game Text —
text
— StringExternal - Convert Game Hotkey —
text
— StringExternalHotkey - Convert Game Asset —
text
— StringExternalAsset - Text With Color —
text
— TextWithColor - Set Text Expression Token —
void
— TextExpressionSetToken - Text Expression —
text
— TextExpressionAssemble
# Examples
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:6564
lv_iter = 1;
for ( ; ( (autoB629ABE7_ai >= 0 && lv_iter <= autoB629ABE7_ae) || (autoB629ABE7_ai < 0 && lv_iter >= autoB629ABE7_ae) ) ; lv_iter += autoB629ABE7_ai ) {
if ((StringCase(libVCMI_gv_pM_MissionCheat_Cheats[lv_iter].lv_titleString, false) == StringCase(StringWord(EventChatMessage(false), 1), false))) {
if ((libVCMI_gv_pM_MissionCheat_Cheats[lv_iter].lv_uIType == libVCMI_ge_MissionCheatUIType_ButtonEditBoxCombo)) {
DataTableSetString(true, ("PS_" + TriggerGetFunction(libVCMI_gv_pM_MissionCheat_Cheats[lv_iter].lv_trigger)), StringWord(EventChatMessage(false), 2));
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:6564
lv_iter = 1;
for ( ; ( (autoB629ABE7_ai >= 0 && lv_iter <= autoB629ABE7_ae) || (autoB629ABE7_ai < 0 && lv_iter >= autoB629ABE7_ae) ) ; lv_iter += autoB629ABE7_ai ) {
if ((StringCase(libVCMI_gv_pM_MissionCheat_Cheats[lv_iter].lv_titleString, false) == StringCase(StringWord(EventChatMessage(false), 1), false))) {
if ((libVCMI_gv_pM_MissionCheat_Cheats[lv_iter].lv_uIType == libVCMI_ge_MissionCheatUIType_ButtonEditBoxCombo)) {
DataTableSetString(true, ("PS_" + TriggerGetFunction(libVCMI_gv_pM_MissionCheat_Cheats[lv_iter].lv_trigger)), StringWord(EventChatMessage(false), 2));
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:578
// Implementation
auto4DFAB3F4_val = StringCase(lp_roomString, false);
if (auto4DFAB3F4_val == "bridge") {
return libVCST_ge_Rooms_StoryRoomBridge;
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:2214
// Automatic Variable Declarations
// Implementation
if ((StringCase(lp_value, false) == "true")) {
return true;
}
mods/core.stormmod — base.stormdata/TriggerLibs/NativeLib.galaxy:1898
// Automatic Variable Declarations
// Implementation
if ((StringCase(lp_value, false) == "true")) {
return true;
}
mods/heroesbrawlmods/heroselectionmods/ingameheroselection.stormmod — base.stormdata/LibIGHS.galaxy:2072
lv_roleString = StringSub(lv_chatString, 14, StringLength(lv_chatString));
}
lv_roleString = StringCase(lv_roleString, false);
auto3C73D8C6_val = lv_roleString;
if (auto3C73D8C6_val == "warrior") {
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:5505
lv_iter = 1;
for ( ; ( (autoB629ABE7_ai >= 0 && lv_iter <= autoB629ABE7_ae) || (autoB629ABE7_ai <= 0 && lv_iter >= autoB629ABE7_ae) ) ; lv_iter += autoB629ABE7_ai ) {
if ((StringCase(libNCMI_gv_NM_MissionCheat_Cheats[lv_iter].lv_titleString, false) == StringCase(StringWord(EventChatMessage(false), 1), false))) {
if ((libNCMI_gv_NM_MissionCheat_Cheats[lv_iter].lv_uIType == libNCMI_ge_MissionCheatUIType_ButtonEditBoxCombo)) {
DataTableSetString(true, ("NS_" + TriggerGetFunction(libNCMI_gv_NM_MissionCheat_Cheats[lv_iter].lv_trigger)), StringWord(EventChatMessage(false), 2));
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:5505
lv_iter = 1;
for ( ; ( (autoB629ABE7_ai >= 0 && lv_iter <= autoB629ABE7_ae) || (autoB629ABE7_ai <= 0 && lv_iter >= autoB629ABE7_ae) ) ; lv_iter += autoB629ABE7_ai ) {
if ((StringCase(libNCMI_gv_NM_MissionCheat_Cheats[lv_iter].lv_titleString, false) == StringCase(StringWord(EventChatMessage(false), 1), false))) {
if ((libNCMI_gv_NM_MissionCheat_Cheats[lv_iter].lv_uIType == libNCMI_ge_MissionCheatUIType_ButtonEditBoxCombo)) {
DataTableSetString(true, ("NS_" + TriggerGetFunction(libNCMI_gv_NM_MissionCheat_Cheats[lv_iter].lv_trigger)), StringWord(EventChatMessage(false), 2));
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCST.galaxy:519
// Implementation
auto4DFAB3F4_val = StringCase(lp_roomString, false);
if (auto4DFAB3F4_val == "bridge") {
return libNCST_ge_Rooms_StoryRoomBridge;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:12818
lv_parameter = StringWord(EventChatMessage(false), 2);
lv_parameter = StringCase(lv_parameter, false);
auto2C90CD67_val = lv_parameter;
if (auto2C90CD67_val == "on") {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOUI.galaxy:5812
}
DialogControlInvokeAsText(libCOUI_gv_cU_FanfareFlash, lv_fanfarePlayers, "SetNameText", PlayerName(lp_player), null, null, null);
DialogControlInvokeAsString(libCOUI_gv_cU_FanfareFlash, lv_fanfarePlayers, "PlayVictoryScreen", StringCase((lv_playerRace), false), null, null, null);
SoundPlayForPlayer(SoundLink("UI_Victory_All", 0), c_maxPlayers, lv_fanfarePlayers, 100.0, 0.0);
}
mods/testmods/autopve.stormmod — base.stormdata/Lib1035AFB3.galaxy:100
lv_testSection = AutomationLuaGlobalGetAsString("TestSection");
if ((StringCase(lv_testSection, false) == "holdout")) {
TriggerExecute(lib1035AFB3_gt_Initialize2ndWaveFight, true, true);
}
mods/testmods/autopve.stormmod — base.stormdata/Lib1035AFB3.galaxy:103
TriggerExecute(lib1035AFB3_gt_Initialize2ndWaveFight, true, true);
}
else if ((StringCase(lv_testSection, false) == "boss")) {
TriggerExecute(lib1035AFB3_gt_InitializeBossFight, true, true);
}
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:200
// Automatic Variable Declarations
// Implementation
TriggerAddEventGeneric(t, ("Event_ChatCheat_" + StringCase(lp_cheatString, false)));
}
mods/warcoop/warcoopdata.sc2mod — base.sc2data/TriggerLibs/WarCoopData.galaxy:3014
// Automatic Variable Declarations
// Variable Initialization
lv_chatstring = StringCase(EventChatMessage(false), false);
lv_chatstringlength = StringLength(lv_chatstring);
lv_chatcheatstring = "";