From Clomosy Docs
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert"> | |||
function clGetStringTo(mainText,ConditionText:String):String; | |||
</div> | |||
In Clomosy, you can use the clGetStringTo function to retrieve text that precedes a character or characters in the text. The basic usage of the clGetStringTo function is as follows: | In Clomosy, you can use the clGetStringTo function to retrieve text that precedes a character or characters in the text. The basic usage of the clGetStringTo function is as follows: | ||
<b>Example</b><br> | |||
<b>TRObject Syntax</b><br> | |||
<pre> | |||
var | |||
mainText,ConditionText,updatedText : String; | |||
{ | |||
mainText = 'AAbBCC'; | |||
ConditionText = 'CC'; | |||
updatedText = clGetStringTo(mainText,ConditionText); | |||
ShowMessage('Updated Text: '+ updatedText); | |||
} | |||
</pre> | |||
<b>Base Syntax</b><br> | |||
<pre> | |||
var | |||
mainText,ConditionText,updatedText : String; | |||
begin | |||
mainText := 'AAbBCC'; | |||
ConditionText := 'CC'; | |||
updatedText := clGetStringTo(mainText,ConditionText); | |||
ShowMessage('Updated Text: '+ updatedText); | |||
end; | |||
</pre> | |||
<b>Output:</b><br> | |||
<div class="alert alert-success" role="alert" data-bs-theme="light"> | |||
Updated Text: AAbB | |||
</div> | |||
<h2> See Also </h2> | |||
* [[ | * [[System_Library#Cl_Utilities_Functions | Cl Utilities Functions]] | ||
Revision as of 06:46, 10 October 2024
function clGetStringTo(mainText,ConditionText:String):String;
In Clomosy, you can use the clGetStringTo function to retrieve text that precedes a character or characters in the text. The basic usage of the clGetStringTo function is as follows:
Example
TRObject Syntax
var
mainText,ConditionText,updatedText : String;
{
mainText = 'AAbBCC';
ConditionText = 'CC';
updatedText = clGetStringTo(mainText,ConditionText);
ShowMessage('Updated Text: '+ updatedText);
}
Base Syntax
var
mainText,ConditionText,updatedText : String;
begin
mainText := 'AAbBCC';
ConditionText := 'CC';
updatedText := clGetStringTo(mainText,ConditionText);
ShowMessage('Updated Text: '+ updatedText);
end;
Output:
Updated Text: AAbB