From Clomosy Docs

(Created page with "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: clGetStringTo(mainText, ConditionText'): String '''Example:''' begin ShowMessage(clGetStringTo('AAbBCC','CC')); end; '''Output:''' AAbB")
 
No edit summary
 
(5 intermediate revisions by 2 users not shown)
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:


  clGetStringTo(mainText, ConditionText'): String
<b>Example</b><br>
 
<pre>
var
  mainText,ConditionText,updatedText : String;
 
{
mainText = 'AAbBCC';
ConditionText = 'CC';
updatedText = clGetStringTo(mainText,ConditionText);
ShowMessage('Updated Text: '+ updatedText);
}
</pre>


'''Example:'''
<b>Output:</b><br>
begin
<div class="alert alert-success" role="alert" data-bs-theme="light">
  ShowMessage(clGetStringTo('AAbBCC','CC'));
Updated Text: AAbB
end;
</div>


'''Output:'''
<h2> See Also </h2>
AAbB
* [[System_Library#Cl_Utilities_Functions | Cl Utilities Functions]]
{{#seo:|title=ClGetStringTo Using in Clomosy - Clomosy Docs}}
{{#seo:|description=clGetStringTo retrieves text from the beginning of a string up to a specified condition, stopping before the defined characters.}}

Latest revision as of 13:53, 24 December 2024

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

var
 mainText,ConditionText,updatedText : String;

{
 mainText = 'AAbBCC';
 ConditionText = 'CC';
 updatedText = clGetStringTo(mainText,ConditionText);
 ShowMessage('Updated Text: '+ updatedText);
}

Output:

See Also