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

◆ Replace()

proto int string::Replace ( string sample,
string replace )
private

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

Аргументы
samplestring to search in str
replacestring which replace sample in str
Возвращает
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 void Print(void var)
Prints content of variable to console/log.
proto int Replace(string sample, string replace)
Replace all occurrances of 'sample' in 'str' by 'replace'.

Используется в PluginFileHandler::AddNewLine(), Surface::AllowedWaterSurface(), BeautifiedToVector(), PluginConfigHandler::DecodeInitScript(), PluginConfigHandler::EncodeInitScript(), PluginFileHandler::GetAllLines(), ScriptConsoleItemsTab::PreprocessFilterText(), ParticleList::RegisterParticleByFullPath(), OpenDirPlugin::Run(), SVNBlamePlugin::Run(), SVNDiffPlugin::Run(), SVNShowLogPlugin::Run(), DayZTool::RunDayZBat(), ScriptConsoleEnfScriptTab::RunEnscript() и CfgGameplayHandler::ValidateItems().