<?xml version="1.0" encoding="ISO-8859-1" ?>
<Template nom="Function Replace text in a string" desc="Function replacing all occurences of a text in a string" param1="" param2="" param3="" param4="" param5="" param6="" param7="" param8="">
    <Events>
        <Event disabled="false">
            <Type value="BuiltinCommonInstructions::While" />
            <WhileConditions>
                <Condition>
                    <Type value="Egal" loc="true" Contraire="false" />
                    <Parametre value="StrFind(VariableString(StrReplaceResult),Function::Parameter(1))" />
                    <Parametre value="-1" />
                    <Parametre value="!=" />
                </Condition>
            </WhileConditions>
            <Conditions />
            <Actions>
                <Action>
                    <Type value="ModVarSceneTxt" loc="true" />
                    <Parametre value="StrReplaceResult" />
                    <Parametre value="SubStr(VariableString(StrReplaceResult), 0, StrFind(VariableString(StrReplaceResult), Function::Parameter(1)))+Function::Parameter(2)+SubStr(VariableString(StrReplaceResult), StrFind(VariableString(StrReplaceResult), Function::Parameter(1))+StrLength(Function::Parameter(1)), StrLength(VariableString(StrReplaceResult)))" />
                    <Parametre value="=" />
                </Action>
            </Actions>
        </Event>
    </Events>
</Template>
