base.StringBuffer.replace()

replace() is used to replace the a sub-string within a sting buffer with another string. The method requires 3 arguments.

Syntax:

stb.replace("string", "new_string", occurences)

Usage example:

MAIN
   DEFINE stb base.StringBuffer
   LET stb = base.StringBuffer.create()
   CALL stb.append("some string")
   CALL stb.replace("string", "pizza", 1)
   DISPLAY stb.toString()
END MAIN

 

Contact Us

Privacy Policy

Copyright © 2025 Querix, (UK) Ltd.