Scripting Guide > Types of Data > Work with Character Functions > Substitute and Substitute Into Functions
발행일 : 03/10/2025

Substitute and Substitute Into Functions

The Substitute() function returns a copy of a string with a replacement expression. The Substitute Into() function changes the original string with a replacement expression.

For example, consider the following script:

str1 = str2 = "All things considered";
 

// str3 holds the result of the Substitute, and str1 is not changed

str3 = Substitute( str1, "All", "Some" );
 

/* Substitute Into returns nothing, so str4 is missing,

and str2 is changed and now holds the result of Substitute Into */

str4 = Substitute Into( str2, "All", "Some" );
Show( str1, str2, str3, str4 );

This script returns the following output:

str1 = "All things considered";

str2 = "Some things considered";

str3 = "Some things considered";

str4 = .;

더 많은 정보를 원하십니까? 질문이 있습니까? JMP 사용자 커뮤니티에서 답변 받기 (community.jmp.com).