Class: String
Lua
C++
Edit

String::Replace

This method performs a search and replace operation on the string and returns the result.

Syntax

Parameter Description
searchtext text to search for
replacetext text to replace with

Returns

Returns the string with all instances of the search term replaced with the replacement text.

Example

#include "UltraEngine.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    String s = "Hello, how are you today?";
    Print(s.Replace("you", "we"));

    return 0;
}
Copyright © 2024 Ultra Software.
All rights reserved.