PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Using StringBuild in the multilingual applications
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Builds a character string according to an initial string and to parameters.
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
MyString1 is string
MyString1 = "The %1 file cannot be opened by " + ...
"the user named %2. The %1 file cannot be accessed."
MyResult is string = StringBuild(MyString1, "Example", "Tintin")
// MyResult contains: "The Example file cannot be
// opened by the user named Tintin. The Example file cannot be accessed."
Versions 18 and later
MyString1 is string
MyString1 = "The %1 file cannot be opened by " + ...
"the user named %2. The %1 file cannot be accessed."
MyArray is array of 1 string
MyArray[1] = "Example"
MyArray[2] = "Tintin"

MyResult is string = StringBuild(MyString1, MyArray)
// MyResult contains: "The Example file cannot be
// opened by the user named Tintin. The Example file cannot be accessed."

// You can also use the following syntax
MyResult is string = StringBuild(MyString1, ["Example", "Tintin"])
New in version 18
MyString1 is string
MyString1 = "The %1 file cannot be opened by " + ...
"the user named %2. The %1 file cannot be accessed."
MyArray is array of 1 string
MyArray[1] = "Example"
MyArray[2] = "Tintin"

MyResult is string = StringBuild(MyString1, MyArray)
// MyResult contains: "The Example file cannot be
// opened by the user named Tintin. The Example file cannot be accessed."

// You can also use the following syntax
MyResult is string = StringBuild(MyString1, ["Example", "Tintin"])
MyString1 is string
MyString1 = "The %1 file cannot be opened by " + ...
"the user named %2. The %1 file cannot be accessed."
MyArray is array of 1 string
MyArray[1] = "Example"
MyArray[2] = "Tintin"

MyResult is string = StringBuild(MyString1, MyArray)
// MyResult contains: "The Example file cannot be
// opened by the user named Tintin. The Example file cannot be accessed."

// You can also use the following syntax
MyResult is string = StringBuild(MyString1, ["Example", "Tintin"])
Syntax

Building a string from parameters Hide the details

<Result> = StringBuild(<Initial String> [, <Parameter 1> [, ... [, <Parameter N>]]])
<Result>: Character string
Result string: the %X characters have been replaced by the specified parameters.
<Initial String>: Character string (with quotes)
Character string containing optional parameters (%1 to %n). To display the % character in the <Result> string, this character must be typed twice (%%).
<Parameter 1>: Optional character string (with quotes)
First parameter that will be inserted into the formatted character string.
<Parameter 1> will replace the %1 character, <Parameter 2> will replace the %2 character, etc.
The number of specified parameters must be equal to or greater than the number of parameters used in <Initial String>.
If <Initial String> contains more parameters, the additional parameters will be replaced by empty strings.
<Parameter N>: Optional character string (with quotes)
Nth parameter that will be inserted into the formatted character string.
<Parameter 1> will replace the %1 character, <Parameter 2> will replace the %2 character, etc.
The number of specified parameters must be equal to or greater than the number of parameters used in <Initial String>.
If <Initial String> contains more parameters, the additional parameters will be replaced by empty strings.
Versions 18 and later

Building a string from parameters stored in an array Hide the details

<Result> = StringBuild(<Initial String> [, <Array of Parameters>])
<Result>: Character string
Result string: the %X characters have been replaced by the specified parameters.
<Initial String>: Character string (with quotes)
Character string containing optional parameters (%1 to %n). To display the % character in the <Result> string, this character must be typed twice (%%).
<Array of Parameters>: Array
Name of the one-dimensional array containing the parameters to insert into the formatted character string.
The first array element will replace the character %1, the second array element will replace the character %2, ...
The number of array elements must be equal to or greater than the number of parameters used in <Initial String>.
If <Initial String> contains more parameters, the additional parameters will be replaced by empty strings.
Note: You also have the ability to pass the array in parameter by using the following notation: [<Element1>, ..., <ElementN>].
New in version 18

Building a string from parameters stored in an array Hide the details

<Result> = StringBuild(<Initial String> [, <Array of Parameters>])
<Result>: Character string
Result string: the %X characters have been replaced by the specified parameters.
<Initial String>: Character string (with quotes)
Character string containing optional parameters (%1 to %n). To display the % character in the <Result> string, this character must be typed twice (%%).
<Array of Parameters>: Array
Name of the one-dimensional array containing the parameters to insert into the formatted character string.
The first array element will replace the character %1, the second array element will replace the character %2, ...
The number of array elements must be equal to or greater than the number of parameters used in <Initial String>.
If <Initial String> contains more parameters, the additional parameters will be replaced by empty strings.
Note: You also have the ability to pass the array in parameter by using the following notation: [<Element1>, ..., <ElementN>].

Building a string from parameters stored in an array Hide the details

<Result> = StringBuild(<Initial String> [, <Array of Parameters>])
<Result>: Character string
Result string: the %X characters have been replaced by the specified parameters.
<Initial String>: Character string (with quotes)
Character string containing optional parameters (%1 to %n). To display the % character in the <Result> string, this character must be typed twice (%%).
<Array of Parameters>: Array
Name of the one-dimensional array containing the parameters to insert into the formatted character string.
The first array element will replace the character %1, the second array element will replace the character %2, ...
The number of array elements must be equal to or greater than the number of parameters used in <Initial String>.
If <Initial String> contains more parameters, the additional parameters will be replaced by empty strings.
Note: You also have the ability to pass the array in parameter by using the following notation: [<Element1>, ..., <ElementN>].
Remarks

Using StringBuild in the multilingual applications

If your application contains messages displayed in several languages, StringBuild is used to replace the optional characters in all the supported languages.
For example:
Window for entering multilingual messages
Related Examples:
Complex strings Unit examples (WINDEV): Complex strings
[ + ] Implementing the building of complex strings with StringBuild.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment