PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
Strings

Data Structures

class  string
 

Functions

proto native int ToInt ()
 Converts string to integer.
 
proto native int HexToInt ()
 Converts string to integer.
 
proto native float ToFloat ()
 Converts string to float.
 
proto vector ToVector ()
 Returns a vector from a string.
 
vector BeautifiedToVector ()
 Convert beautified string into a vector.
 
proto native int ToAscii ()
 Converts string's first character to ASCII code.
 
proto native ToType ()
 Returns internal type representation. Can be used in runtime, or cached in variables and used for faster inheritance checking.
 
static proto string ToString (void var, bool type=false, bool name=false, bool quotes=true)
 Return string representation of variable.
 
proto string Substring (int start, int len)
 Substring of 'str' from 'start' position 'len' number of characters.
 
string SubstringInverted (string string_to_split, int position_start, int position_end)
 Inverted SubString. This deletes everything in between position_start and position_end.
 
proto string SubstringUtf8 (int startChar, int len)
 Substring of 'str' from 'startChar' position 'len' number of characters for UTF8 strings with multibyte chars.
 
proto int Replace (string sample, string replace)
 Replace all occurrances of 'sample' in 'str' by 'replace'.
 
proto int ToLower ()
 Changes string to lowercase. Returns length.
 
proto int ToUpper ()
 Changes string to uppercase. Returns length.
 
proto native int Length ()
 Returns length of string.
 
proto native int LengthUtf8 ()
 Returns number of characters in UTF8 string.
 
proto native int Hash ()
 Returns hash of string.
 
proto native int IndexOf (string sample)
 Finds 'sample' in 'str'. Returns -1 when not found.
 
proto native int LastIndexOf (string sample)
 Finds last 'sample' in 'str'. Returns -1 when not found.
 
proto native int IndexOfFrom (int start, string sample)
 Finds 'sample' in 'str' from 'start' position. Returns -1 when not found.
 
bool Contains (string sample)
 Returns true if sample is substring of string.
 
proto string Trim ()
 Returns trimmed string with removed leading and trailing whitespaces.
 
proto int TrimInPlace ()
 Removes leading and trailing whitespaces in string. Returns length.
 
proto int ParseStringEx (out string token)
 Parses one token from input string. Result is put into token string, and type of token is returned. Input string is left-truncated by the resulting token length.
 
proto int ParseString (out string tokens[])
 Parses string into array of tokens returns number of tokens.
 
void Split (string sample, out array< string > output)
 Splits string into array of strings separated by 'sample'.
 
static string Join (string separator, notnull TStringArray tokens)
 
proto string Get (int index)
 Gets n-th character from string.
 
proto void Set (int index, string input)
 Sets the n-th character in string with the input, replacing previous value.
 
proto void Insert (int index, string input)
 Inserts a string into the n-th index, increasing the string length by the size of the input.
 
static proto string Format (string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
 Gets n-th character from string.
 

Variables

static const string Empty
 

Detailed Description

Function Documentation

◆ BeautifiedToVector()

vector BeautifiedToVector ( )
inlineprivate

Convert beautified string into a vector.

Parameters
vecbeautified string
Returns
vector resulting vector

References string::Replace(), and string::ToVector().

◆ Contains()

bool Contains ( string  sample)
inlineprivate

Returns true if sample is substring of string.

Parameters
samplestring Finding string expression
Returns
bool true if sample is substring of string
string str = "Hello World";
Print( str.IndexOfFrom( 3, "Hello" ) );
Print( str.IndexOfFrom( 3, "Mexico" ) );
>> true
>> false
proto void Print(void var)
Prints content of variable to console/log.
proto native int IndexOfFrom(int start, string sample)
Finds 'sample' in 'str' from 'start' position. Returns -1 when not found.

Referenced by ActionCreateIndoorFireplace::ActionCondition(), ActionCreateIndoorOven::ActionCondition(), ActionPlaceFireplaceIndoor::ActionCondition(), ActionPlaceOvenIndoor::ActionCondition(), BaseBuildingBase::CanDisplayAttachmentCategory(), CarScript::CanDisplayAttachmentCategory(), BaseBuildingBase::CanDisplayAttachmentSlot(), ScriptConsoleSoundsTab::ChangeFilter(), ScriptConsoleItemsTab::ChangeFilter(), BaseBuildingBase::CheckLevelVerticalDistance(), BaseBuildingBase::CheckSlotVerticalDistance(), AttachmentsOutOfReach::CreateAttachmentPosition(), CreateMission(), DisplayActions(), DropNonUsableMaterialsServer(), ItemBase::EEHealthLevelChanged(), Edible_Base::EEItemLocationChanged(), UIPopupScript::FindInHierarchy(), ScriptConsoleConfigTab::FindInHierarchy(), CheckLocalisationPlugin::FindTexts(), ItemBase::FullyBuild(), Debug::GetFiltredConfigClasses(), UIScriptedMenu::GetFiltredConfigClasses(), UIScriptedMenu::GetFiltredSceneObjects(), SpookyEventBase::GetMatchingSurfacePos(), ActionTargetsCursor::GetOnScreenPosition(), GUIAction_SetValue(), ItemBase::HandleItemFalling(), IsEntityOnWaterSurface(), Land_WarheadStorage_PowerStation::OnAnimationPhaseStarted(), PluginFileHandler::ParseToValueBool(), ScriptConsoleItemsTab::PreprocessFilterText(), ScriptConsoleConfigTab::RenderVariables(), ScriptConsoleSoundsTab::ScriptConsoleSoundsTab(), PluginBase::SpawnFromClipboard(), ObjectSpawnerHandler::SpawnObject(), ScriptConsoleGeneralTab::TextToNumbersArray(), ItemBase::ToggleAnimation(), ActionUnlockShippingContainer::TranslateLockSelectionIntoDoorIdx(), and ObjectSpawnerHandler::ValidatePath().

◆ Format()

static proto string Format ( string  fmt,
void  param1 = NULL,
void  param2 = NULL,
void  param3 = NULL,
void  param4 = NULL,
void  param5 = NULL,
void  param6 = NULL,
void  param7 = NULL,
void  param8 = NULL,
void  param9 = NULL 
)
staticprivate

Gets n-th character from string.

Parameters
indexcharacter index
Returns
string character on index-th position in string
int a = 5;
float b = 5.99;
string c = "beta";
string test = string.Format("Ahoj %1 = %3 , %2", a, b, c);
Print(test);
>> 'Ahoj 5 = 'beta' , 5.99'

Referenced by Add(), Category(), Car::CheckContactCache(), CGame::Connect(), EffectAreaLoader::CreateZones(), ItemBase::EEItemAttached(), ItemBase::EEItemDetached(), FailureText(), FullTimeData::FormatedAsTimestamp(), FullTimeData::FormatedNonZero(), FullTimeData::FormatedWithZero(), ActionTargetsCursor::GetActionDesc(), ActionDigInStash::GetAdminLogMessage(), GetAdminLogMessage(), ActionMountBarbedWire::GetAdminLogMessage(), ActionUnmountBarbedWire::GetAdminLogMessage(), ErrorProperties::GetClientMessage(), GetColorString(), GetComponentNamesFromDamageZone(), GetDamageZoneMap(), UndergroundAreaLoader::GetData(), EffectParticle::GetDebugName(), EffectSound::GetDebugName(), ConstructionActionData::GetDialNumberText(), QuantityConversions::GetItemQuantityText(), TentBase::GetMaterialPath(), ParticleList::GetParticleFullPath(), InputUtils::GetRichtextButtonIconFromInputAction(), ErrorProperties::GetServerMessage(), ErrorHandlerModule::GetSimpleMessage(), array::GetTestEx(), GPSReceiver::GPSReceiver(), HandleError(), Weapon_Base::HideBullet(), Entity::InitDamageZoneDisplayNameMapping(), LandMineTrap(), ScriptConsoleItemsTab::ListItemRelatedActions(), CfgGameplayHandler::LoadData(), CfgPlayerRestrictedAreaHandler::LoadData(), Debug::LogMessage(), Weapon_Base::OnFire(), Play(), Hologram::RefreshVisual(), ParticleList::RegisterParticle(), TFModule::Result(), ActionTargetsCursor::SetItemDesc(), LoginScreenBase::SetTime(), UIScriptedMenu::SetTime(), ScriptedWidgetEventHandler::SetWeaponModeAndZeroing(), ScriptedWidgetEventHandler::SetWeaponQuantity(), Weapon_Base::ShowBullet(), Tag(), TripwireTrap(), and UIScriptedMenu::UpdateControlsElements().

◆ Get()

proto string Get ( int  index)
private

◆ Hash()

◆ HexToInt()

proto native int HexToInt ( )
private

Converts string to integer.

Returns
int - Converted string.
string str = "0xFF";
int i = str.HexToInt();
Print(i);
>> i = 255
proto native int HexToInt()
Converts string to integer.

Referenced by CfgGameplayHandler::GetHitIndicationIndicatorColor().

◆ IndexOf()

◆ IndexOfFrom()

proto native int IndexOfFrom ( int  start,
string  sample 
)
private

Finds 'sample' in 'str' from 'start' position. Returns -1 when not found.

Parameters
startint Start from position
samplestring Finding string expression
Returns
int - Length of string s
string str = "Hello World";
Print( str.IndexOfFrom( 3, "H" ) );
Print( str.IndexOfFrom( 3, "W" ) );
Print( str.IndexOfFrom( 3, "Q" ) );
>> -1
>> 6
>> -1

Referenced by PluginBase::GetBaseClassPathCombined(), ActionUnmountBarbedWire::GetZoneSelection(), PluginFileHandler::ParseTextToArray(), PluginFileHandler::ParseToValueArray(), OpenDirPlugin::Run(), DayZTool::RunDayZBat(), and CGame::SetMissionPath().

◆ Insert()

proto void Insert ( int  index,
string  input 
)
private

Inserts a string into the n-th index, increasing the string length by the size of the input.

Parameters
indexindex to insert at
inputstring value to insert with
Warning
VME When index less than 0 or greater than string length
VME When string is empty
string str = "Hello World";
str.Insert(6, "Test ");
Print( str );
>> 'Hello Test World'
proto void Insert(int index, string input)
Inserts a string into the n-th index, increasing the string length by the size of the input.

Referenced by ActionBuildPart::ActionConditionContinue(), ActionBuildShelter::ActionConditionContinue(), HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::GetHierarchyPath(), ScriptedWidgetEventHandler::LoadEntries(), ActionBuildPart::OnFinishProgressServer(), PluginFileHandler::ParseTextToArray(), and string::Split().

◆ Join()

static string Join ( string  separator,
notnull TStringArray  tokens 
)
inlinestaticprivate

◆ LastIndexOf()

proto native int LastIndexOf ( string  sample)
private

Finds last 'sample' in 'str'. Returns -1 when not found.

Parameters
samplestring Finding string
Returns
int - Returns position where sample starts, or -1 when sample not found
string str = "Hello World";
Print( str.IndexOf( "l" ) );
>> 9

Referenced by ParticleList::RegisterParticleByFullPath().

◆ Length()

proto native int Length ( )
private

Returns length of string.

Returns
int - Length of string
string str = "Hello World";
int i = str.Length();
Print(i);
>> i = 11
proto native int Length()
Returns length of string.

Referenced by ActionEnterLadder::ActionCondition(), ScriptedWidgetEventHandler::AddEx(), JsonObject::AddString(), Car::CanReachSeatFromDoors(), UIScriptedMenu::ConnectLastSession(), ManBase::Consume(), PluginBase::ContainsFirstClass(), AttachmentsOutOfReach::CreateAttachmentPosition(), WrittenNoteData::DepleteWritingImplement(), DialNextNumber(), WeaponStateBase::DropBullet(), DropNonUsableMaterialsServer(), ScriptedWidgetEventHandler::FillInfo(), FireworksLauncherClientEvent::FireworksLauncherClientEvent(), PluginBase::GetBaseClassPath(), PluginBase::GetConfig(), PluginBase::GetConfigRecursive(), ConstructionActionData::GetDialNumberText(), ScriptedWidgetEventHandler::GetFilterOptionsPC(), FireplaceIndoor::GetFirePointIndex(), FireplaceBase::GetFirePointIndex(), JsonObject::GetJson(), CGame::GetModelName(), PluginBase::GetOnlyChildPath(), ItemBase::GetSlotIndexByAttachmentSlot(), ItemBase::GetSlotIndexBySelection(), PluginFileHandler::GetTextType(), ScriptedWidgetEventHandler::GetValueString(), ActionUnmountBarbedWire::GetZoneSelection(), PoweredOptic_Base::InitRangeFinderData(), InsertAtPos(), IsComponentInSelection(), IsPingInRange(), PluginFileHandler::IsTextArray(), OptionSelectorSliderSetup::IsValidEditboxValue(), ScriptConsoleCameraTab::IsValidEditboxValue(), UIScriptedMenu::OnClick(), ActionCarDoors::OnEnd(), CGame::OnEvent(), DayZPlayer::OnStepEvent(), OrderedAltitudeNumbersPosition(), OrderedPositionNumbersFromGridCoords(), PluginFileHandler::ParseText(), PluginFileHandler::ParseTextToArray(), PluginFileHandler::ParseTextToParameter(), PluginFileHandler::ParseToValueArray(), PluginFileHandler::ParseToValueString(), WeaponStateBase::PushBulletToChamber(), WeaponStateBase::PushBulletToInternalMagazine(), ParticleList::RegisterParticleByFullPath(), OpenDirPlugin::Run(), DayZTool::RunDayZBat(), SanitizeString(), Debug::SaveLog(), Hud::SetCursorIcon(), ActionTargetsCursor::SetItemDesc(), ScriptedWidgetEventHandler::SetType(), ShuffleLock(), string::SubstringInverted(), ScriptConsoleGeneralTab::TextToNumbersArray(), ToStringLen(), DebugPrint::TrimDebugLog(), HudDebugWinBase::Update(), and ValueToBar().

◆ LengthUtf8()

proto native int LengthUtf8 ( )
private

Returns number of characters in UTF8 string.

Returns
int - Number of characters in UTF8 string
string str = "こんにちは世界";
int i = str.LengthUtf8();
Print(i);
>> i = 7
proto native int LengthUtf8()
Returns number of characters in UTF8 string.

◆ ParseString()

proto int ParseString ( out string  tokens[])
private

Parses string into array of tokens returns number of tokens.

Parameters
[out]tokensarray[] Parsed string in array
Returns
int Number of tokens
string token[2];
string str = "Hello World";
int result = str.ParseString(token);
for (int i = 0; i < 2; i++)
{
Print(token[i]);
}
>> 'Hello'
>> 'World'
proto int ParseString(out string tokens[])
Parses string into array of tokens returns number of tokens.

◆ ParseStringEx()

proto int ParseStringEx ( out string  token)
private

Parses one token from input string. Result is put into token string, and type of token is returned. Input string is left-truncated by the resulting token length.

Parameters
[out]tokenstring Founded string token
Returns
int Type of token
Token types:
 0 - error, no token
 1 - defined token (special characters etc. . / * )
 2 - quoted string. Quotes are removed -> TODO
 3 - alphabetic string
 4 - number
 5 - end of line -> TODO
string input = "Hello*World";
string token1;
string token2;
int result1 = input.ParseStringEx(token1);
int result2 = input.ParseStringEx(token2);
Print( "Token1 = '" + token1 + "' Type = " + result1.ToString() ) );
Print( "Token2 = '" + token2 + "' Type = " + result2.ToString() ) );
>> 'Toke1 = 'Hello' Type = 3'
>> 'Toke1 = '*' Type = 1'
proto int ParseStringEx(out string token)
Parses one token from input string. Result is put into token string, and type of token is returned....

◆ Replace()

proto int Replace ( string  sample,
string  replace 
)
private

Replace all occurrances of 'sample' in 'str' by 'replace'.

Parameters
samplestring to search in str
replacestring which replace sample in str
Returns
int - number of occurrances of 'sample' in 'str'
string test = "If the length of the C string in source is less than num, only the content up to the terminating null-character is copied.";
Print(test);
int count = test.Replace("the", "*");
Print(count);
Print(test);
>> string test = 'If the length of the C string in source is less than num, only the content up to the terminating null-character is copied.';
>> int count = 4
>> string test = 'If * length of * C string in source is less than num, only * content up to * terminating null-character is copied.'
proto int Replace(string sample, string replace)
Replace all occurrances of 'sample' in 'str' by 'replace'.

Referenced by PluginFileHandler::AddNewLine(), Surface::AllowedWaterSurface(), string::BeautifiedToVector(), PluginConfigHandler::DecodeInitScript(), PluginConfigHandler::EncodeInitScript(), PluginFileHandler::GetAllLines(), ScriptConsoleItemsTab::PreprocessFilterText(), ParticleList::RegisterParticleByFullPath(), SVNBlamePlugin::Run(), SVNDiffPlugin::Run(), OpenDirPlugin::Run(), SVNShowLogPlugin::Run(), ResavePlugin::RunCommandline(), DayZTool::RunDayZBat(), ScriptConsoleEnfScriptTab::RunEnscript(), and CfgGameplayHandler::ValidateItems().

◆ Set()

proto void Set ( int  index,
string  input 
)
private

Sets the n-th character in string with the input, replacing previous value.

Parameters
indexindex to be replaced
inputsingle non-terminated character value to replace with
Warning
VME When index less than 0 or greater than string length
(Diag) VME When string is empty or greater than length of 1 (Retail) Calls 'string.Insert' except it replaces only the initial character
string str = "Hello World";
str[4] = "O";
Print( str );
>> 'HellO World'
string str = "Hello World";
str[6] = "Test ";
Print( str );
>> 'Hello Test orld'

Referenced by ItemBase::GardenBase().

◆ Split()

void Split ( string  sample,
out array< string output 
)
inlineprivate

Splits string into array of strings separated by 'sample'.

Parameters
samplestring Strings separator
Returns
TStringArray Array with strings
string example = "The quick brown fox jumps over the lazy dog";
example.Split(" ", strs);
for (int i = 0; i < strs.Count(); i++)
{
Print(strs.Get(i));
}
>> 'The'
>> 'quick'
>> 'brown'
>> 'fox'
>> 'jumps'
>> 'over'
>> 'the'
>> 'lazy'
>> 'dog'
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition IsBoxCollidingGeometryProxyClasses.c:28
array< string > TStringArray
Definition EnScript.c:709
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
Definition EnString.c:396

References string::Insert(), and string::Substring().

Referenced by JsonObject::AddString(), DisplayActions(), UIPopupScript::FindInHierarchy(), ScriptConsoleConfigTab::FindInHierarchy(), ScriptedWidgetEventHandler::GenerateValidIP(), PluginBase::GetBaseClasses(), PluginBase::GetConfig(), GetServersResultRow::GetIP(), CGame::GetLastVisitedServer(), PluginFileHandler::GetParameterString(), PluginFileHandler::GetSubParameterInArrayString(), ServerBrowserTab::GetTimeOfDayEnum(), ServerBrowserTabConsolePages::LoadExtraEntries(), ScriptConsoleConfigTab::OnClick(), OnGUI_AnimEvents(), ParseData(), PluginFileHandler::ParseTextToArray(), PluginFileHandler::ParseToValueArray(), PasteValues(), ScriptConsoleSoundsTab::PrepareFilters(), ScriptConsoleItemsTab::PrepareFilters(), DayZPlayer::ProcessAttachmentEvent(), ScriptConsoleConfigTab::RenderVariables(), ScriptedWidgetEventHandler::SetTime(), ScriptedWidgetEventHandler::SetTimeIcon(), and PluginBase::SpawnFromClipboard().

◆ Substring()

proto string Substring ( int  start,
int  len 
)
private

Substring of 'str' from 'start' position 'len' number of characters.

Parameters
startPosition in str
lenCount of characters
Returns
string - Substring of str
string str = "Hello World";
string strSub = str.Substring(2, 5);
Print(strSub);
>> strSub = llo W
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.

Referenced by ActionEnterLadder::ActionCondition(), TentBase::AnimateCamonetByOpeningSelection(), TentBase::AnimateCamonetToggle(), PluginBase::ContainsFirstClass(), AttachmentsOutOfReach::CreateAttachmentPosition(), PluginBase::GetBaseClassPathCombined(), PluginBase::GetConfig(), PluginBase::GetConfigRecursive(), ScriptedWidgetEventHandler::GetFilterOptionsPC(), FireplaceIndoor::GetFirePointIndex(), FireplaceBase::GetFirePointIndex(), Chemlight_ColorBase::GetMaterialForDamageState(), CGame::GetModelName(), PluginBase::GetOnlyChildPath(), PluginBase::GetPlayerPrefix(), PluginConfigHandler::GetSceneList(), ItemBase::GetSlotIndexByAttachmentSlot(), ItemBase::GetSlotIndexBySelection(), PluginFileHandler::GetTextType(), ScriptedWidgetEventHandler::GetValueString(), ActionUnmountBarbedWire::GetZoneSelection(), TentBase::HandleCamoNetAttachment(), InsertAtPos(), IsPingInRange(), PluginFileHandler::IsTextArray(), UIScriptedMenu::OnClick(), ScriptConsoleConfigTab::OnClick(), PluginFileHandler::ParseText(), PluginFileHandler::ParseTextToArray(), PluginFileHandler::ParseTextToParameter(), PluginFileHandler::ParseToValueArray(), PluginFileHandler::ParseToValueString(), ParticleList::RegisterParticleByFullPath(), OpenDirPlugin::Run(), DayZTool::RunDayZBat(), SanitizeString(), CGame::SetMissionPath(), string::Split(), string::SubstringInverted(), ScriptConsoleGeneralTab::TextToNumbersArray(), ActionUnlockShippingContainer::TranslateLockSelectionIntoDoorIdx(), DebugPrint::TrimDebugLog(), and HudDebugWinBase::Update().

◆ SubstringInverted()

string SubstringInverted ( string  string_to_split,
int  position_start,
int  position_end 
)
inlineprivate

Inverted SubString. This deletes everything in between position_start and position_end.

References string::Length(), and string::Substring().

◆ SubstringUtf8()

proto string SubstringUtf8 ( int  startChar,
int  len 
)
private

Substring of 'str' from 'startChar' position 'len' number of characters for UTF8 strings with multibyte chars.

Parameters
startCharPosition in str.
lenCount of characters
Returns
string - Substring of str with startChar character and len characters
string str = "こんにちは世界";
string strSub = str.SubstringUtf8(2, 4);
Print(strSub);
>> strSub = にちは世
proto string SubstringUtf8(int startChar, int len)
Substring of 'str' from 'startChar' position 'len' number of characters for UTF8 strings with multiby...

◆ ToAscii()

proto native int ToAscii ( )
private

Converts string's first character to ASCII code.

Parameters
strString for convert to ASCII code
Returns
ascii code int.
int ascii = "M".ToAscii();
Print(ascii);
>> ascii = 77

◆ ToFloat()

proto native float ToFloat ( )
private

◆ ToInt()

◆ ToLower()

proto int ToLower ( )
private

Changes string to lowercase. Returns length.

Returns
int - Length of changed string
string str = "Hello World";
int i = str.ToLower();
Print(str);
Print(i);
>> str = hello world
>> i = 11
proto int ToLower()
Changes string to lowercase. Returns length.

Referenced by AnalyticsRegisterStat(), AnalyticsSetState(), BleedingSourcesManagerBase::AttemptAddBleedingSourceBySelection(), Entity::CacheSkinningBloodInfectionChance(), BaseBuildingBase::CanDisplayAttachmentCategory(), CarScript::CanDisplayAttachmentCategory(), BaseBuildingBase::CanDisplayAttachmentSlot(), ItemBase::CanToggleAnimations(), ScriptConsoleSoundsTab::ChangeFilter(), ScriptConsoleItemsTab::ChangeFilter(), BaseBuildingBase::CheckSlotVerticalDistance(), AttachmentsOutOfReach::CreateAttachmentPosition(), PluginConfigHandler::CustomLocationsAdd(), PluginConfigHandler::CustomLocationsRemove(), DisplayActions(), DropNonUsableMaterialsServer(), ItemBase::EEHealthLevelChanged(), ItemBase::EEItemDetached(), UIPopupScript::FindInHierarchy(), ScriptConsoleConfigTab::FindInHierarchy(), GetComponentIndex(), PluginBase::GetConfig(), PluginBase::GetConfigRecursive(), GetDamageZoneFromComponentName(), Debug::GetFiltredConfigClasses(), UIScriptedMenu::GetFiltredConfigClasses(), UIScriptedMenu::GetFiltredSceneObjects(), PluginConfigHandler::GetLocationsData(), IEntity::GetLODByName(), ServerBrowserHelperFunctions::GetMapDisplayName(), LOD::GetSelectionByName(), Car::GetSelectionFromAnimSource(), ServerBrowserHelperFunctions::GetServerMapImagePath(), ItemBase::GetSlotIndexBySelection(), GUIAction_SetValue(), ItemBase::HideAllAnimationsAndProxyPhysics(), MissionBaseWorld::InitialiseWorldData(), IsComponentInSelection(), CGame::IsKindOf(), CGame::ObjectIsKindOf(), ActionMountBarbedWire::OnFinishProgressServer(), DynamicMusicPlayerRegistry::PreloadData(), ScriptConsoleSoundsTab::PrepareFilters(), ScriptConsoleItemsTab::PrepareFilters(), ScriptConsoleConfigTab::RenderVariables(), ScriptConsoleItemsTab::SelectPreset(), AutoTestFixture::SetWorldName(), ItemBase::ToggleAnimation(), ItemBase::UpdateAllSelections(), and ItemBase::UpdatePhysics().

◆ ToString()

static proto string ToString ( void  var,
bool  type = false,
bool  name = false,
bool  quotes = true 
)
staticprivate

Return string representation of variable.

Referenced by HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::Abort(), CGame::AddInventoryJunctureEx(), AnimatedActionBase::Do(), AnimatedActionBase::End(), ComponentEnergyManager::Event_OnAwake(), HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::FindAbortDestinationState(), ItemBase::GardenBase(), AntibioticsMdfr::GetDebugText(), ChelationMdfr::GetDebugText(), DisinfectionMdfr::GetDebugText(), EpinephrineMdfr::GetDebugText(), ImmunityBoost::GetDebugText(), MorphineMdfr::GetDebugText(), PainKillersMdfr::GetDebugText(), AntibioticsMdfr::GetDebugTextSimple(), CharcoalMdfr::GetDebugTextSimple(), ChelationMdfr::GetDebugTextSimple(), DisinfectionMdfr::GetDebugTextSimple(), Hologram::Hologram(), ActionBaseCB::Interrupt(), ComponentEnergyManager::IsSelectionAPlug(), PluginFileHandler::LoadConfigFile(), PluginConfigHandler::LoadSceneObjects(), Debug::LogArrayInt(), OnActionEnd(), PluginFileHandler::ParseParam(), PluginBase::PlayerKilled(), PrintElements(), HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::ProcessAbortEvent(), HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::ProcessEvent(), PluginConfigHandler::SaveSceneObjects(), PluginLocalProfile::SceneSave(), ActionBase::SetupAction(), OFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::Start(), FSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::Start(), HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::Start(), HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::Terminate(), ToStringLen(), UpdatePlayerStatus(), and ComponentEnergyManager::UpdateSelections().

◆ ToType()

proto native ToType ( )
private

◆ ToUpper()

proto int ToUpper ( )
private

Changes string to uppercase. Returns length.

Returns
int - Length of changed string
string str = "Hello World";
int i = str.ToUpper();
Print(str);
Print(i);
>> str = HELLO WORLD
>> i = 11
@ WORLD
4_World
Definition EnProfiler.c:30
proto int ToUpper()
Changes string to uppercase. Returns length.

Referenced by ScriptedWidgetEventHandler::AddEx(), HandsPreview::CreateNewIcon(), ServerBrowserHelperFunctions::GetMapDisplayName(), ScriptedWidgetEventHandler::SetItemDesc(), and ActionTargetsCursor::SetItemDesc().

◆ ToVector()

proto vector ToVector ( )
private

Returns a vector from a string.

Returns
vector Converted s as vector
string str = "1 0 1";
vector v = str.ToVector();
Print(v);
>> v = <1,0,1>
Definition EnConvert.c:106
proto vector ToVector()
Returns a vector from a string.

Referenced by string::BeautifiedToVector(), UIScriptedMenu::OnClick(), and SceneObject::SetPositionAsString().

◆ Trim()

proto string Trim ( )
private

Returns trimmed string with removed leading and trailing whitespaces.

Returns
string - Trimmed string
string str = " Hello World "
Print( str );
Print( str.Trim() );
>> ' Hello World '
>> 'Hello World'
proto string Trim()
Returns trimmed string with removed leading and trailing whitespaces.

Referenced by PluginBase::GetOnlyChildPath(), ScriptConsoleConfigTab::OnClick(), PluginFileHandler::ParseText(), PluginFileHandler::ParseTextToParameter(), ScriptConsoleSoundsTab::PrepareFilters(), ScriptConsoleItemsTab::PrepareFilters(), and PluginBase::SpawnFromClipboard().

◆ TrimInPlace()

proto int TrimInPlace ( )
private

Removes leading and trailing whitespaces in string. Returns length.

Returns
int - Count of chars
string str = " Hello World ";
int i = str.TrimInPlace();
Print(str);
Print(i);
>> str = 'Hello World'
>> i = 11
proto int TrimInPlace()
Removes leading and trailing whitespaces in string. Returns length.

Referenced by ScriptedWidgetEventHandler::GetValueString().

Variable Documentation

◆ Empty