Salesforce

RepStr (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

RepStr (Magic xpa 4.x)

Replaces all occurrences of an Alpha substring with a string that has another substring.

Syntax:

RepStr(source string, original substring, new substring)

Parameters:

source string – The string in which the substring will be replaced.

original substring – The substring to be replaced.

new substring – Substring that will replace any occurrence of the substring being replaced.

Returns:

The string that contains the modified substring.

Example:

RepStr('BB//CC//DD//EE','//','==') returns BB==CC==DD==EE

Note:

The original substring and the new substring may differ in length. If the original substring is longer than the new substring, then the remaining spaces are truncated and the result string will be shorter than the source string.

If the original substring is shorter than the new string, then the result string will be longer than the source string.

See also:

The Online and Rich Client Samples projects (program ST08 and RST08)

Reference
Attachment 
Attachment