Zoomed Image

AMSX Scripting Language - Command : ReplaceFirst

Summary

Replace the first occurrence of a string within a given string

Description

Finds the first occurrence of the search string within the source string and replaces it with the replacement. The result is stored in the result buffer. Unlike Replace, only the first match is replaced.

Parameters

ParameterDescription
cmdSource string to search within
Argument 0String to find
Argument 1Replacement string

Syntax


ReplaceFirst "Source string to search within", "String to find", "Replacement string"

Return to the AMSX Command Reference