OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                     
 

3.5.5.17 Replace

Description

This function is used to replace n characters in string within$, starting at StartPosth position with string replace$. replace$ may be different length than n.

Syntax

 string Replace(string within$, int StartPos, int n, string replace$)

Parameters

within$

The containing string that will be partially replaced.

StartPos

The starting position of the string to be replaced.

n

The number of characters to replace.

replace$

The replacing string.

Return

A new string containing replace$.

Example

string nn$=Replace(abcdefghijklmn,3,5,123456)$;
nn$=; //Should return "AB123456HIJKLMN".

See Also

Substitute

 

© OriginLab Corporation. All rights reserved.