DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ IndexOf()

proto native int string::IndexOf ( string sample)
private

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

Аргументы
samplestring Finding string
Возвращает
int - Returns position where sample starts, or -1 when sample not found
string str = "Hello World";
Print( str.IndexOf( "H" ) );
Print( str.IndexOf( "W" ) );
Print( str.IndexOf( "Q" ) );
>> 0
>> 6
>> -1
proto void Print(void var)
Prints content of variable to console/log.
proto native int IndexOf(string sample)
Finds 'sample' in 'str'. Returns -1 when not found.

Используется в PluginBase::ContainsFirstClass(), PluginBase::GetConfig(), Chemlight_ColorBase::GetMaterialForDamageState(), PluginConfigHandler::GetSceneList(), ItemBase::GetSlotIndexBySelection(), PluginFileHandler::GetTextType(), ScriptedWidgetEventHandler::GetValueString(), DebugPrint::IsDebugLog(), DebugPrint::IsStackTrace(), ScriptConsoleConfigTab::OnClick(), UIScriptedMenu::OnClick(), BotStateBase::OnUpdate(), PluginFileHandler::ParseParam(), PluginFileHandler::ParseText(), PluginFileHandler::ParseTextToArray(), PluginFileHandler::ParseTextToParameter(), OpenDirPlugin::Run(), DayZTool::RunDayZBat(), DebugPrint::TrimDebugLog() и DebugPrint::TrimStackTrace().