[Libreoffice-commits] help.git: source/text
Rafael Lima (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 28 13:23:50 UTC 2021
source/text/sbasic/shared/03/sf_string.xhp | 1909 +++++++++++++++--------------
source/text/sbasic/shared/03120202.xhp | 2
2 files changed, 1012 insertions(+), 899 deletions(-)
New commits:
commit 4a07d8d492c50f0e2db3200790f92e9e18bb5144
Author: Rafael Lima <rafael.palma.lima at gmail.com>
AuthorDate: Sat Jul 24 22:12:28 2021 +0200
Commit: Jean-Pierre Ledure <jp at ledure.be>
CommitDate: Wed Jul 28 15:23:26 2021 +0200
Adapt SF_String to new method signatures and add Python examples
Change-Id: Ifd9fa48fcb34ca8469581b8f3d8aac29f51b8414
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/119438
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp at ledure.be>
diff --git a/source/text/sbasic/shared/03/sf_string.xhp b/source/text/sbasic/shared/03/sf_string.xhp
index 2971a2f5b..43db8d582 100644
--- a/source/text/sbasic/shared/03/sf_string.xhp
+++ b/source/text/sbasic/shared/03/sf_string.xhp
@@ -18,14 +18,14 @@
<body>
<section id="ScriptForge-sf_string">
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id151579602147056">
- <bookmark_value>String service</bookmark_value>
- </bookmark>
+ <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id151579602147056">
+ <bookmark_value>String service</bookmark_value>
+ </bookmark>
</section>
<section id="abstract">
- <h1 id="hd_id521580038927003" xml-lang="en-US"><variable id="StringService"><link href="text/sbasic/shared/03/sf_string.xhp" name="String service"><literal>ScriptForge</literal>.<literal>String</literal> service</link></variable></h1>
- <paragraph role="paragraph" xml-lang="en-US" id="par_id351579602570526">The <literal>String</literal> service provides a collection of methods for string processing. These methods can be used to:</paragraph>
+ <h1 id="hd_id521580038927003"><variable id="StringService"><link href="text/sbasic/shared/03/sf_string.xhp" name="String service"><literal>ScriptForge</literal>.<literal>String</literal> service</link></variable></h1>
+ <paragraph role="paragraph" id="par_id351579602570526">The <literal>String</literal> service provides a collection of methods for string processing. These methods can be used to:</paragraph>
<list type="unordered">
<listitem>
<paragraph id="par_id611611952070366" role="listitem">Validate the contents of strings</paragraph>
@@ -42,7 +42,7 @@
</list>
</section>
-<h2 id="hd_id961579603699855">Definitions</h2>
+ <h2 id="hd_id961579603699855">Definitions</h2>
<h3 id="hd_id441579603838777">Line breaks</h3>
<paragraph role="paragraph" id="par_id791611946942340">The <literal>String</literal> service recognizes the following line breaks:</paragraph>
@@ -163,97 +163,110 @@
</listitem>
</list>
- <h2 id="hd_id201586594659135" xml-lang="en-US">Service invocation</h2>
+ <h2 id="hd_id201586594659135">Service invocation</h2>
<paragraph role="paragraph" id="par_id141609955500101">Before using the <literal>ScriptForge.String</literal> service the <literal>ScriptForge</literal> library needs to be loaded using:</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id871608192694632">GlobalScope.BasicLibraries.loadLibrary("ScriptForge")</paragraph>
+ </bascode>
+ <paragraph role="paragraph" id="par_id271627158844922">Loading the library will create the <literal>SF_String</literal> object that can be used to call the methods in the <literal>String</literal> service.</paragraph>
+ <paragraph role="paragraph" id="par_id63158659509728">The following code snippets show the three ways to call methods from the <literal>String</literal> service (the <literal>Capitalize</literal> method is used as an example):</paragraph>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id641627157912899">Dim s as String : s = "abc def"</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id181586594723543">s = SF_String.Capitalize(s) ' Abc Def</paragraph>
+ </bascode>
<bascode>
- <paragraph role="bascode" localize="false" id="bas_id871608192694632">GlobalScope.BasicLibraries.LoadLibrary("ScriptForge")</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id641627157912017">Dim s as String : s = "abc def"</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id441586594733346">Dim svc : svc = SF_String</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id481586594739978">s = svc.Capitalize(s) ' Abc Def</paragraph>
</bascode>
- <paragraph role="paragraph" id="par_id63158659509728" xml-lang="en-US">The following code snippets show the three ways to call methods in the <literal>String</literal> service (the <literal>ExpandTabs</literal> method is used as an example):</paragraph>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id181586594723543">SF_String.ExpandTabs(...)</paragraph>
- </bascode>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id441586594733346">Dim s : s = SF_String</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id481586594739978">s.ExpandTabs(...)</paragraph>
- </bascode>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id431586594750461">Dim s : s = CreateScriptService("String")</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id471586594758689">s.ExpandTabs(...)</paragraph>
- </bascode>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id641627157912647">Dim s as String : s = "abc def"</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id431586594750461">Dim svc : svc = CreateScriptService("String")</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id471586594758689">s = svc.Capitalize(s) ' Abc Def</paragraph>
+ </bascode>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
+ <paragraph role="paragraph" id="par_id761627158463235">The code snippet below illustrates how to invoke methods from the <literal>String</literal> service in Python scripts. The <literal>IsIPv4</literal> method is used as an example.</paragraph>
+ <pycode>
+ <paragraph role="pycode" localize="false" id="pyc_id171627158604379">from scriptforge import CreateScriptService</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id101627158604648">svc = CreateScriptService("String")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id171627158604858">ip_address = '192.168.0.14'</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id551627158605138">svc.IsIPv4(ip_address) # True</paragraph>
+ </pycode>
-<h2 id="hd_id651584978211886" xml-lang="en-US">Properties</h2>
- <paragraph role="paragraph" id="par_id241611950267068">The <literal>SF_String</literal> object provides the following properties:</paragraph>
+ <h2 id="hd_id651584978211886">Properties</h2>
+ <paragraph role="paragraph" id="par_id241611950267068">The <literal>SF_String</literal> object provides the following properties for Basic scripts:</paragraph>
<table id="tab_id761584978211275">
<tablerow>
<tablecell>
- <paragraph id="par_id271584978211792" role="tablehead" xml-lang="en-US">Name</paragraph>
+ <paragraph id="par_id271584978211792" role="tablehead">Name</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id241584978211550" role="tablehead" xml-lang="en-US">ReadOnly</paragraph>
+ <paragraph id="par_id241584978211550" role="tablehead">ReadOnly</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id621584978211403" role="tablehead" xml-lang="en-US">Description</paragraph>
+ <paragraph id="par_id621584978211403" role="tablehead">Description</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
- <paragraph id="par_id581584978715552" role="tablecontent" xml-lang="en-US" localize="false">sfCR</paragraph>
+ <paragraph id="par_id581584978715552" role="tablecontent" localize="false">sfCR</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id71584978715562" role="tablecontent" xml-lang="en-US">Yes</paragraph>
+ <paragraph id="par_id71584978715562" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id581584978715701" role="tablecontent" xml-lang="en-US">Carriage return: Chr(13)</paragraph>
+ <paragraph id="par_id581584978715701" role="tablecontent">Carriage return: Chr(13)</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
- <paragraph id="par_id91584978211231" role="tablecontent" xml-lang="en-US" localize="false">sfCRLF</paragraph>
+ <paragraph id="par_id91584978211231" role="tablecontent" localize="false">sfCRLF</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id211584978211383" role="tablecontent" xml-lang="en-US">Yes</paragraph>
+ <paragraph id="par_id211584978211383" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id691584978211774" role="tablecontent" xml-lang="en-US">Carriage return + Linefeed: Chr(13) & Chr(10)</paragraph>
+ <paragraph id="par_id691584978211774" role="tablecontent">Carriage return + Linefeed: Chr(13) & Chr(10)</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
- <paragraph id="par_id1001584978666440" role="tablecontent" xml-lang="en-US" localize="false">sfLF</paragraph>
+ <paragraph id="par_id1001584978666440" role="tablecontent" localize="false">sfLF</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id671584978666689" role="tablecontent" xml-lang="en-US">Yes</paragraph>
+ <paragraph id="par_id671584978666689" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id951584978666296" role="tablecontent" xml-lang="en-US">Linefeed: Chr(10)</paragraph>
+ <paragraph id="par_id951584978666296" role="tablecontent">Linefeed: Chr(10)</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
- <paragraph id="par_id311584978666162" role="tablecontent" xml-lang="en-US" localize="false">sfNEWLINE</paragraph>
+ <paragraph id="par_id311584978666162" role="tablecontent" localize="false">sfNEWLINE</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id421584978666327" role="tablecontent" xml-lang="en-US">Yes</paragraph>
+ <paragraph id="par_id421584978666327" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id901584978666158" role="tablecontent" xml-lang="en-US">Carriage return + Linefeed, which can be<br/>1) Chr(13) & Chr(10) or
+ <paragraph id="par_id901584978666158" role="tablecontent">Carriage return + Linefeed, which can be<br/>1) Chr(13) & Chr(10) or
<br/>2) Linefeed: Chr(10)
<br/>depending on the operating system.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
- <paragraph id="par_id371584978666469" role="tablecontent" xml-lang="en-US" localize="false">sfTAB</paragraph>
+ <paragraph id="par_id371584978666469" role="tablecontent" localize="false">sfTAB</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id541584978666991" role="tablecontent" xml-lang="en-US">Yes</paragraph>
+ <paragraph id="par_id541584978666991" role="tablecontent">Yes</paragraph>
</tablecell>
<tablecell>
- <paragraph id="par_id741584978666508" role="tablecontent" xml-lang="en-US">Horizontal tabulation: Chr(9)</paragraph>
+ <paragraph id="par_id741584978666508" role="tablecontent">Horizontal tabulation: Chr(9)</paragraph>
</tablecell>
</tablerow>
</table>
- <tip id="par_id461584978880380" xml-lang="en-US">You can use the properties above to identify or insert the corresponding characters inside strings. For example, the Linefeed can be replaced by <literal>SF_String.sfLF</literal>.</tip>
+ <tip id="par_id461584978880380">You can use the properties above to identify or insert the corresponding characters inside strings. For example, the Linefeed can be replaced by <literal>SF_String.sfLF</literal>.</tip>
<table id="tab_id501611613601554">
<tablerow>
@@ -295,7 +308,7 @@
<link href="text/sbasic/shared/03/sf_string.xhp#IsUrl" name="IsUrl method">IsUrl</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#IsWhitespace" name="IsWhitespace method">IsWhitespace</link><br/>
<link href="text/sbasic/shared/03/sf_string.xhp#JustifyCenter" name="JustifyCenter method">JustifyCenter</link><br/>
- <link href="text/sbasic/shared/03/sf_string.xhp#JustifyLeft" name="JustifyLeft method">JustifyLeft</link><br/><br/>
+ <link href="text/sbasic/shared/03/sf_string.xhp#JustifyLeft" name="JustifyLeft method">JustifyLeft</link><br/>
</paragraph>
</tablecell>
<tablecell>
@@ -319,855 +332,931 @@
</tablerow>
</table>
<note id="par_id151611951803163">The first argument of most methods is the string to be considered. It is always passed by reference and left unchanged. Methods such as <literal>Capitalize</literal>, <literal>Escape</literal>, etc return a new string after their execution.</note>
+ <warning id="par_id371627158142730">Because Python has comprehensive built-in string support, most of the methods in the <literal>String</literal> service are available for Basic scripts only. The methods available for Basic and Python are: <literal>HashStr</literal>, <literal>IsADate</literal>, <literal>IsEmail</literal>, <literal>IsFileName</literal>, <literal>IsIBAN</literal>, <literal>IsIPv4</literal>, <literal>IsLike</literal>, <literal>IsSheetName</literal>, <literal>IsUrl</literal>, <literal>SplitNotQuoted</literal> and <literal>Wrap</literal>.</warning>
<section id="Capitalize">
- <comment> Capitalize -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id121582203710297">
- <bookmark_value>String service;Capitalize</bookmark_value>
- </bookmark>
+ <comment> Capitalize -------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id121582203710297">
+ <bookmark_value>String service;Capitalize</bookmark_value>
+ </bookmark>
<h2 id="hd_id791579683635979" localize="false">Capitalize</h2>
- <paragraph role="paragraph" id="par_id271579683706571">Capitalizes the first character from each word in the input string.</paragraph>
- <h3 id="hd_id381579687079872" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id531579684617249">SF_String.Capitalize(InputStr As String) As String</paragraph>
- </bascode>
- <h3 id="hd_id791582304381135" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id941582304592013"><emph>InputStr</emph>: The string to be capitalized.</paragraph>
- <h3 id="hd_id181579683940500" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id631579688532444">Dim sName as String : sName = "john smith"</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id451579686015963">Dim sCapitalizedName as String</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id41579785318230">sCapitalizedName = SF_String.Capitalize(sName)</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id801579688542131">MsgBox sCapitalizedName 'John Smith</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id271579683706571">Capitalizes the first character from each word in the input string.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id121627158901416">
+ <input>svc.Capitalize(inputstr: str): str</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id941582304592013"><emph>inputstr</emph>: The string to be capitalized.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id631579688532444">Dim sName as String : sName = "john smith"</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id451579686015963">Dim sCapitalizedName as String</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id41579785318230">sCapitalizedName = SF_String.Capitalize(sName)</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id801579688542131">MsgBox sCapitalizedName 'John Smith</paragraph>
+ </bascode>
</section>
<section id="Count">
- <comment> Count -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" branch="index" id="bm_id421582384432626" localize="false">
- <bookmark_value>String service;Count</bookmark_value>
+ <comment> Count ------------------------------------------------------------------------------------------------- </comment>
+ <bookmark branch="index" id="bm_id421582384432626" localize="false">
+ <bookmark_value>String service;Count</bookmark_value>
</bookmark>
<h2 id="hd_id1001582384527265" localize="false">Count</h2>
- <paragraph role="paragraph" id="par_id891582384556756">Counts the number of occurrences of a substring or a regular expression within a string.</paragraph>
- <h3 id="hd_id561582384583468" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id541582384611917">SF_String.Count(InputStr As String, Substring As String[, IsRegex As Boolean][, CaseSensitive As Boolean]) As Long</paragraph>
- </bascode>
- <h3 id="hd_id471582384639119" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id571582384689863"><emph>InputStr</emph>: The input string to be examined</paragraph>
- <paragraph role="paragraph" id="par_id601582384696486"><emph>Substring</emph>: The substring or the regular expression to be used during search</paragraph>
- <paragraph role="paragraph" id="par_id451582384703719"><emph>IsRegex</emph>: Use <literal>True</literal> if the substring is a regular expression (default = <literal>False</literal>)</paragraph>
- <paragraph role="paragraph" id="par_id141582384726168"><emph>CaseSensitive</emph>: Default = <literal>False</literal></paragraph>
- <h3 id="hd_id1001582384736960" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" id="bas_id371582384749769">'Counts the occurrences of the substring "or" inside the input string (returns 2)</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id281582384809689">MsgBox SF_String.Count("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "or", CaseSensitive := False)</paragraph>
- <paragraph role="bascode" id="bas_id561582384801586">'Counts the number of words with only lowercase letters (returns 7)</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id631582384780777">MsgBox SF_String.Count("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "\b[a-z]+\b", IsRegex := True, CaseSensitive := True)</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id891582384556756">Counts the number of occurrences of a substring or a regular expression within a string.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id421627159083108">
+ <input>svc.Count(inputstr: str, substring: str, [isregex: bool], [casesensitive: bool]): int</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id571582384689863"><emph>inputstr</emph>: The input string to be examined</paragraph>
+ <paragraph role="paragraph" id="par_id601582384696486"><emph>substring</emph>: The substring or the regular expression to be used during search</paragraph>
+ <paragraph role="paragraph" id="par_id451582384703719"><emph>isregex</emph>: Use <literal>True</literal> if the substring is a regular expression (Default = <literal>False</literal>)</paragraph>
+ <paragraph role="paragraph" id="par_id141582384726168"><emph>casesensitive</emph>: The search can be case sensitive or not (Default = <literal>False</literal>).</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" id="bas_id371582384749769">'Counts the occurrences of the substring "or" inside the input string (returns 2)</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id281582384809689">MsgBox SF_String.Count("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "or", CaseSensitive := False)</paragraph>
+ <paragraph role="bascode" id="bas_id561582384801586">'Counts the number of words with only lowercase letters (returns 7)</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id631582384780777">MsgBox SF_String.Count("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "\b[a-z]+\b", IsRegex := True, CaseSensitive := True)</paragraph>
+ </bascode>
<tip id="par_id131612223767126">To learn more about regular expressions, refer to the Python's documentation on <link href="https://docs.python.org/3/library/re.html" name="Regular expressions">Regular Expression Operations</link>.</tip>
</section>
<section id="EndsWith">
- <comment> EndsWith -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id771582203795803">
- <bookmark_value>String service;EndsWith</bookmark_value>
- </bookmark>
+ <comment> EndsWith ---------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id771582203795803">
+ <bookmark_value>String service;EndsWith</bookmark_value>
+ </bookmark>
<h2 id="hd_id801579687630238" localize="false">EndsWith</h2>
- <paragraph role="paragraph" id="par_id581579687739629">Returns <literal>True</literal> if a string ends with a specified substring.</paragraph>
- <paragraph role="paragraph" id="par_id21612306392239">The function returns <literal>False</literal> when either the string or the substring have a length = 0 or when the substring is longer than the string.</paragraph>
- <h3 id="hd_id171579860926083" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id411579861070487">SF_String.EndsWith(InputStr As String, Substring As String[, CaseSensitive As Boolean]) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id531579861378017" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id191579861552201"><emph>InputStr</emph>: The string to be tested.</paragraph>
- <paragraph role="paragraph" id="par_id211579861561473"><emph>Substring</emph>: The substring to be searched at the end of <literal>InputStr</literal>.</paragraph>
- <paragraph role="paragraph" id="par_id801579861574009"><emph>CaseSensitive</emph>: The comparison can be case sensitive or not (default = <literal>False</literal>).</paragraph>
- <h3 id="hd_id281579862794982" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" id="bas_id811579862998452">'Returns True because the method was called with the default CaseSensitive = False</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id581579863063364">MsgBox SF_String.EndsWith("abcdefg", "EFG")</paragraph>
- <paragraph role="bascode" id="bas_id231579863168747">'Returns False due to the CaseSensitive parameter</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id221579863071644">MsgBox SF_String.EndsWith("abcdefg", "EFG", CaseSensitive := True)</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id581579687739629">Returns <literal>True</literal> if a string ends with a specified substring.</paragraph>
+ <paragraph role="paragraph" id="par_id21612306392239">The function returns <literal>False</literal> when either the string or the substring have a length = 0 or when the substring is longer than the string.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id551627159333520">
+ <input>svc.EndsWith(inputstr: str, substring: str, [casesensitive: bool]): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id191579861552201"><emph>inputstr</emph>: The string to be tested.</paragraph>
+ <paragraph role="paragraph" id="par_id211579861561473"><emph>substring</emph>: The substring to be searched at the end of <literal>InputStr</literal>.</paragraph>
+ <paragraph role="paragraph" id="par_id801579861574009"><emph>casesensitive</emph>: The search can be case sensitive or not (Default = <literal>False</literal>).</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" id="bas_id811579862998452">'Returns True because the method was called with the default CaseSensitive = False</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id581579863063364">MsgBox SF_String.EndsWith("abcdefg", "EFG")</paragraph>
+ <paragraph role="bascode" id="bas_id231579863168747">'Returns False due to the CaseSensitive parameter</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id221579863071644">MsgBox SF_String.EndsWith("abcdefg", "EFG", CaseSensitive := True)</paragraph>
+ </bascode>
</section>
<section id="Escape">
- <comment> Escape -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id731585921441446">
- <bookmark_value>String service;Escape</bookmark_value>
- </bookmark>
- <h2 id="hd_id821585921441213" localize="false">Escape</h2>
- <paragraph role="paragraph" id="par_id921585921441429">Converts linebreaks and tabs contained in the input string to their equivalent escaped sequence (\\, \n, \r, \t).</paragraph>
- <h3 id="hd_id61585921441151" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id581585921441246">SF_String.Escape(InputStr As String) As String</paragraph>
- </bascode>
- <h3 id="hd_id841585921441890" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id9158592144110"><emph>InputStr</emph>: The string to be converted.</paragraph>
- <h3 id="hd_id60158592144145" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" id="bas_id901585921441483">'Returns the string "abc\n\tdef\\n"</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id741585921441977">MsgBox SF_String.Escape("abc" & Chr(10) & Chr(9) & "def\n")</paragraph>
- </bascode>
+ <comment> Escape ------------------------------------------------------------------------------------------------ </comment>
+ <bookmark localize="false" branch="index" id="bm_id731585921441446">
+ <bookmark_value>String service;Escape</bookmark_value>
+ </bookmark>
+ <h2 id="hd_id821585921441213" localize="false">Escape</h2>
+ <paragraph role="paragraph" id="par_id921585921441429">Converts linebreaks and tabs contained in the input string to their equivalent escaped sequence (\\, \n, \r, \t).</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id151627159520587">
+ <input>svc.Escape(inputstr: str): str</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id9158592144110"><emph>inputstr</emph>: The string to be converted.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" id="bas_id901585921441483">'Returns the string "abc\n\tdef\\n"</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id741585921441977">MsgBox SF_String.Escape("abc" & Chr(10) & Chr(9) & "def\n")</paragraph>
+ </bascode>
</section>
<section id="ExpandTabs">
- <comment> ExpandTabs -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id161582203880251">
- <bookmark_value>String service;ExpandTabs</bookmark_value>
- </bookmark>
+ <comment> ExpandTabs -------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id161582203880251">
+ <bookmark_value>String service;ExpandTabs</bookmark_value>
+ </bookmark>
<h2 id="hd_id761579868039113" localize="false">ExpandTabs</h2>
- <paragraph role="paragraph" id="par_id271579868053137">Replaces Tab characters <literal>Chr(9)</literal> by space characters to replicate the behavior of tab stops.</paragraph>
- <paragraph role="paragraph" id="par_id951579868064344">If a line break is found, a new line is started and the character counter is reset.</paragraph>
- <h3 id="hd_id131579868074952" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id161579868246119">SF_String.ExpandTabs(InputStr As String[, TabSize As Integer]) As String</paragraph>
- </bascode>
- <h3 id="hd_id551579868261335" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id231579868290408"><emph>InputStr</emph>: The string to be expanded</paragraph>
- <paragraph role="paragraph" id="par_id281579868299807"><emph>TabSize</emph>: This parameter is used to determine the Tab stops using the formula: TabSize + 1, 2 * TabSize + 1 , ... N * TabSize + 1 (default = 8)</paragraph>
- <h3 id="hd_id691579868460957" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id611579868690878">Dim myText as String</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id931585922081615">myText = "100" & SF_String.sfTAB & "200" & SF_String.sfTAB & "300" & SF_String.sfNEWLINE & _</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id311579868703742"> "X" & SF_String.sfTAB & "Y" & SF_String.sfTAB & "Z"</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id841585921966229">MsgBox SF_String.ExpandTabs(myText)</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id461579868714135">'100 200 300</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id461579868714136">'X Y Z</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id271579868053137">Replaces Tab characters <literal>Chr(9)</literal> by space characters to replicate the behavior of tab stops.</paragraph>
+ <paragraph role="paragraph" id="par_id951579868064344">If a line break is found, a new line is started and the character counter is reset.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id821627159598950">
+ <input>svc.ExpandTabs(inputstr: str, [tabsize: int]): str</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id231579868290408"><emph>inputstr</emph>: The string to be expanded</paragraph>
+ <paragraph role="paragraph" id="par_id281579868299807"><emph>tabsize</emph>: This parameter is used to determine the Tab stops using the formula: TabSize + 1, 2 * TabSize + 1 , ... N * TabSize + 1 (Default = 8)</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id611579868690878">Dim myText as String</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id931585922081615">myText = "100" & SF_String.sfTAB & "200" & SF_String.sfTAB & "300" & SF_String.sfNEWLINE & _</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id311579868703742"> "X" & SF_String.sfTAB & "Y" & SF_String.sfTAB & "Z"</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id841585921966229">MsgBox SF_String.ExpandTabs(myText)</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id461579868714135">'100 200 300</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id461579868714136">'X Y Z</paragraph>
+ </bascode>
</section>
<section id="FilterNotPrintable">
- <comment> FilterNotPrintable -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id231582204001536">
- <bookmark_value>String service;FilterNotPrintable</bookmark_value>
- </bookmark>
+ <comment> FilterNotPrintable ------------------------------------------------------------------------------------ </comment>
+ <bookmark localize="false" branch="index" id="bm_id231582204001536">
+ <bookmark_value>String service;FilterNotPrintable</bookmark_value>
+ </bookmark>
<h2 id="hd_id581579874537114" localize="false">FilterNotPrintable</h2>
- <paragraph role="paragraph" id="par_id161579874552729">Replaces all non-printable characters in the input string by a given character.</paragraph>
- <h3 id="hd_id521579874572260" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id141579874588279">SF_String.FilterNotPrintable(InputStr As String[, ReplacedBy As String]) As String</paragraph>
- </bascode>
- <h3 id="hd_id471579874607847" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id431579874633865"><emph>InputStr</emph>: The string to be searched</paragraph>
- <paragraph role="paragraph" id="par_id31579874656437"><emph>ReplacedBy</emph>: Zero, one or more characters that will replace all non-printable characters in <literal>InputStr</literal> (Default = "")</paragraph>
- <h3 id="hd_id661579874669320" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id481579874686887">Dim LF : LF = Chr(10)</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id41579874696422">Dim myText as String</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id611579874737551">myText = "àén ΣlPµ" & LF & " Русский" & "\n"</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id271579874750894">MsgBox SF_String.FilterNotPrintable(myText)</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id81612308364024">' "àén ΣlPµ Русский\n"</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id161579874552729">Replaces all non-printable characters in the input string by a given character.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id271627159754299">
+ <input>svc.FilterNotPrintable(inputstr: str, [replacedby: str]): str</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id431579874633865"><emph>inputstr</emph>: The string to be searched</paragraph>
+ <paragraph role="paragraph" id="par_id31579874656437"><emph>replacedby</emph>: Zero, one or more characters that will replace all non-printable characters in <literal>inputstr</literal> (Default = "")</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id481579874686887">Dim LF : LF = Chr(10)</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id41579874696422">Dim myText as String</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id611579874737551">myText = "àén ΣlPµ" & LF & " Русский" & "\n"</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id271579874750894">MsgBox SF_String.FilterNotPrintable(myText)</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id81612308364024">' "àén ΣlPµ Русский\n"</paragraph>
+ </bascode>
</section>
<section id="FindRegex">
- <comment> FindRegex -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id491582204303825">
- <bookmark_value>String service;FindRegex</bookmark_value>
- </bookmark>
+ <comment> FindRegex --------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id491582204303825">
+ <bookmark_value>String service;FindRegex</bookmark_value>
+ </bookmark>
<h2 id="hd_id471579876212449" localize="false">FindRegex</h2>
- <paragraph role="paragraph" id="par_id1001579876228707">Finds in a string a substring matching a given regular expression.</paragraph>
- <h3 id="hd_id81579876242016" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id661579876255913">SF_String.FindRegex(InputStr As String, Regex As String[, Start As Long[, CaseSensitive As Boolean[, Forward As Boolean]]]) As String</paragraph>
- </bascode>
- <h3 id="hd_id561579876264354" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id131579876314120"><emph>InputStr</emph>: The string to be searched</paragraph>
- <paragraph role="paragraph" id="par_id751579876371545"><emph>Regex</emph>: The regular expression</paragraph>
- <paragraph role="paragraph" id="par_id881579876394584"><emph>Start</emph>: The position in the string where the search will begin. This parameter is passed by reference, so after execution the value of <literal>Start</literal> will point to the first character of the found substring. If no matching substring is found, <literal>Start</literal> will be set to 0.</paragraph>
- <paragraph role="paragraph" id="par_id251579876403831"><emph>CaseSensitive</emph>: Default = <literal>False</literal></paragraph>
- <paragraph role="paragraph" id="par_id841579876412287"><emph>Forward</emph>: Determines the direction of the search. If <literal>True</literal>, search moves forward. If <literal>False</literal> search moves backwards (Default = <literal>True</literal>)</paragraph>
- <paragraph role="paragraph" id="par_id451612309155653">At the first iteration, if <literal>Forward = True</literal>, then <literal>Start</literal> should be equal to 1, whereas if <literal>Forward = False</literal> then <literal>Start</literal> should be equal to <literal>Len(InputStr)</literal></paragraph>
- <h3 id="hd_id651579876420512" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id621579876463377">Dim lStart As Long : lStart = 1</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id1001579876429088">Dim result as String</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id571579876474344">result = SF_String.FindRegex("abCcdefghHij", "C.*H", lStart, CaseSensitive := True)</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id671579876511592">MsgBox lStart & ": " & result</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id51579876497768">'3: CcdefghH</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id1001579876228707">Finds in a string a substring matching a given regular expression.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id591627159907982">
+ <input>svc.FindRegex(inputstr: str, regex: str, [start: int], [casesensitive: bool], [forward: boo]): str</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id131579876314120"><emph>inputstr</emph>: The string to be searched</paragraph>
+ <paragraph role="paragraph" id="par_id751579876371545"><emph>regex</emph>: The regular expression</paragraph>
+ <paragraph role="paragraph" id="par_id881579876394584"><emph>start</emph>: The position in the string where the search will begin. This parameter is passed by reference, so after execution the value of <literal>start</literal> will point to the first character of the found substring. If no matching substring is found, <literal>start</literal> will be set to 0.</paragraph>
+ <paragraph role="paragraph" id="par_id251579876403831"><emph>casesensitive</emph>: The search can be case sensitive or not (Default = <literal>False</literal>).</paragraph>
+ <paragraph role="paragraph" id="par_id841579876412287"><emph>forward</emph>: Determines the direction of the search. If <literal>True</literal>, search moves forward. If <literal>False</literal> search moves backwards (Default = <literal>True</literal>)</paragraph>
+ <paragraph role="paragraph" id="par_id451612309155653">At the first iteration, if <literal>forward = True</literal>, then <literal>start</literal> should be equal to 1, whereas if <literal>forward = False</literal> then <literal>start</literal> should be equal to <literal>Len(inputstr)</literal></paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id621579876463377">Dim lStart As Long : lStart = 1</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id1001579876429088">Dim result as String</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id571579876474344">result = SF_String.FindRegex("abCcdefghHij", "C.*H", lStart, CaseSensitive := True)</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id671579876511592">MsgBox lStart & ": " & result</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id51579876497768">'3: CcdefghH</paragraph>
+ </bascode>
<tip id="par_id221612309579001">In the example above, the new value of <literal>lStart</literal> can be used to keep searching the same input string by setting the <literal>Start</literal> parameter to <literal>lStart + Len(result)</literal> at the next iteration.</tip>
</section>
<section id="HashStr">
- <comment> HashStr -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id24160104898372">
- <bookmark_value>String service;HashStr</bookmark_value>
- </bookmark>
- <h2 id="hd_id871601048983883" localize="false">HashStr</h2>
- <paragraph role="paragraph" id="par_id471601048983628">Hash functions are used inside some cryptographic algorithms, in digital signatures, message authentication codes, manipulation detection, fingerprints, checksums (message integrity check), hash tables, password storage and much more.</paragraph>
- <paragraph role="paragraph" id="par_id301601048983765" xml-lang="en-US">The <literal>HashStr</literal> method returns the result of a hash function applied on a given string and using a specified algorithm, as a string of lowercase hexadecimal digits.</paragraph>
- <paragraph role="paragraph" id="par_id631601048983149" xml-lang="en-US">The hash algorithms supported are: <literal>MD5</literal>, <literal>SHA1</literal>, <literal>SHA224</literal>, <literal>SHA256</literal>, <literal>SHA384</literal> and <literal>SHA512</literal>.</paragraph>
- <h3 id="hd_id501601048983376" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id841601048983230">SF_String.HashStr(InputStr As String, Algorithm As String) As String</paragraph>
- </bascode>
- <h3 id="hd_id231601048983458" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id621601048983210"><emph>InputStr</emph> : The string to hash. It is presumed to be encoded in UTF-8. The hashing algorithm will consider the string as a stream of bytes.</paragraph>
- <paragraph role="paragraph" id="par_id941601048983822" xml-lang="en-US"><emph>Algorithm</emph> : One of the supported algorithms listed above, passed as a string.</paragraph>
- <h3 id="hd_id11601048983215" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id721601048983555">MsgBox SF_String.HashStr("œ∑¡™£¢∞§¶•ªº–≠œ∑´®†¥¨ˆøπ‘åß∂ƒ©˙∆˚¬", "MD5")</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id891612351766467">' c740ccc2e201df4b2e2b4aa086f35d8a</paragraph>
- </bascode>
+ <comment> HashStr ----------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id24160104898372">
+ <bookmark_value>String service;HashStr</bookmark_value>
+ </bookmark>
+ <h2 id="hd_id871601048983883" localize="false">HashStr</h2>
+ <paragraph role="paragraph" id="par_id471601048983628">Hash functions are used inside some cryptographic algorithms, in digital signatures, message authentication codes, manipulation detection, fingerprints, checksums (message integrity check), hash tables, password storage and much more.</paragraph>
+ <paragraph role="paragraph" id="par_id301601048983765">The <literal>HashStr</literal> method returns the result of a hash function applied on a given string and using a specified algorithm, as a string of lowercase hexadecimal digits.</paragraph>
+ <paragraph role="paragraph" id="par_id631601048983149">The hash algorithms supported are: <literal>MD5</literal>, <literal>SHA1</literal>, <literal>SHA224</literal>, <literal>SHA256</literal>, <literal>SHA384</literal> and <literal>SHA512</literal>.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id741627160211210">
+ <input>svc.HashStr(inputstr: str, algorithm: str): str</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id621601048983210"><emph>inputstr</emph>: The string to hash. It is presumed to be encoded in UTF-8. The hashing algorithm will consider the string as a stream of bytes.</paragraph>
+ <paragraph role="paragraph" id="par_id941601048983822"><emph>algorithm</emph>: One of the supported algorithms listed above, passed as a string.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id721601048983555">MsgBox SF_String.HashStr("œ∑¡™£¢∞§¶•ªº–≠œ∑´®†¥¨ˆøπ‘åß∂ƒ©˙∆˚¬", "MD5")</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id891612351766467">' c740ccc2e201df4b2e2b4aa086f35d8a</paragraph>
+ </bascode>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
+ <pycode>
+ <paragraph role="pycode" localize="false" id="pyc_id201627248048720">svc = CreateScriptService("String")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id101627248049176">bas = CreateScriptService("Basic")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id401627248049343">a_string = "œ∑¡™£¢∞§¶•ªº–≠œ∑´®†¥¨ˆøπ‘åß∂ƒ©˙∆˚¬"</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id611627248049495">hash_value = svc.HashStr(a_string, "MD5")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id471627248049687">bas.MsgBox(hash_value)</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id121627248049991"># c740ccc2e201df4b2e2b4aa086f35d8a</paragraph>
+ </pycode>
</section>
<section id="HtmlEncode">
- <comment> HtmlEncode -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id561582204334292">
- <bookmark_value>String service;HtmlEncode</bookmark_value>
- </bookmark>
+ <comment> HtmlEncode -------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id561582204334292">
+ <bookmark_value>String service;HtmlEncode</bookmark_value>
+ </bookmark>
<h2 id="hd_id771579879504956" localize="false">HtmlEncode</h2>
- <paragraph role="paragraph" id="par_id221579879516929">Encodes the input string into the HTML character codes, replacing special characters by their <literal>&</literal> counterparts.</paragraph>
- <paragraph role="paragraph" id="par_id341612351999692">For example, the character <literal>é</literal> would be replaced by <literal>é</literal> or an equivalent numerical HTML code.</paragraph>
- <h3 id="hd_id41579879526291" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id291579879535883">SF_String.HtmlEncode(InputStr) As String</paragraph>
- </bascode>
- <h3 id="hd_id331579879545045" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="bas_id501579879570781"><emph>InputStr</emph>: The string to encode</paragraph>
- <h3 id="hd_id451579880024971" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id671579879597547">MsgBox SF_String.HtmlEncode("<a href=""https://a.b.com"">From α to ω</a>")</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id461579879607044">' "<a href="https://a.b.com">From α to ω</a>"</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id221579879516929">Encodes the input string into the HTML character codes, replacing special characters by their <literal>&</literal> counterparts.</paragraph>
+ <paragraph role="paragraph" id="par_id341612351999692">For example, the character <literal>é</literal> would be replaced by <literal>é</literal> or an equivalent numerical HTML code.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id601627160353326">
+ <input>svc.HtmlEncode(inputstr: str): str</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="bas_id501579879570781"><emph>inputstr</emph>: The string to encode.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id671579879597547">MsgBox SF_String.HtmlEncode("<a href=""https://a.b.com"">From α to ω</a>")</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id461579879607044">' "<a href="https://a.b.com">From α to ω</a>"</paragraph>
+ </bascode>
</section>
<section id="IsADate">
- <comment> IsADate -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id11582204732653">
- <bookmark_value>String service;IsADate</bookmark_value>
- </bookmark>
+ <comment> IsADate ---------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id11582204732653">
+ <bookmark_value>String service;IsADate</bookmark_value>
+ </bookmark>
<h2 id="hd_id141579880967392" localize="false">IsADate</h2>
- <paragraph role="paragraph" id="par_id171579880990533">Returns <literal>True</literal> if the input string is a valid date according to a specified date format.</paragraph>
- <h3 id="hd_id401579881016326" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id361579881029686">SF_String.IsADate(InputStr As String[, DateFormat As String]) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id571579881041949" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id151579881091821"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal></paragraph>
- <paragraph role="paragraph" id="par_id991579881107670"><emph>DateFormat</emph>: The date format, as a string. It can be either "YYYY-MM-DD" (default), "DD-MM-YYYY" or "MM-DD-YYYY"</paragraph>
- <paragraph role="paragraph" id="par_id291579881117126">The dash (-) may be replaced by a dot (.), a slash (/) or a space.</paragraph>
- <paragraph role="paragraph" id="par_id51579881125801"> If the format is invalid, the method returns <literal>False</literal>.</paragraph>
- <h3 id="hd_id531579881133911" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id811579881155015">MsgBox SF_String.IsADate("2020-12-31", "YYYY-MM-DD") ' True</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id171579880990533">Returns <literal>True</literal> if the input string is a valid date according to a specified date format.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id191627160586821">
+ <input>svc.IsADate(inputstr: str, [dateformat: str]): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id151579881091821"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal></paragraph>
+ <paragraph role="paragraph" id="par_id991579881107670"><emph>dateformat</emph>: The date format, as a string. It can be either "YYYY-MM-DD" (default), "DD-MM-YYYY" or "MM-DD-YYYY"</paragraph>
+ <paragraph role="paragraph" id="par_id291579881117126">The dash (-) may be replaced by a dot (.), a slash (/) or a space.</paragraph>
+ <paragraph role="paragraph" id="par_id51579881125801"> If the format is invalid, the method returns <literal>False</literal>.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id811579881155015">MsgBox SF_String.IsADate("2020-12-31", "YYYY-MM-DD") ' True</paragraph>
+ </bascode>
<note id="par_id211612370427721">This method checks the format of the input string without performing any calendar-specific checks. Hence it does not test the input string for leap years or months with 30 or 31 days. For that, refer to the <link href="text/sbasic/shared/03102300.xhp" name="IsDate function"><literal>IsDate</literal> built-in function</link>.</note>
<paragraph role="paragraph" id="par_id181612371147364">The example below shows the difference between the methods <literal>IsADate</literal> (ScriptForge) and the <literal>IsDate</literal> (built-in) function.</paragraph>
<bascode>
<paragraph role="bascode" localize="false" id="bas_id531612371248704">Dim myDate as String : myDate = "2020-02-30"</paragraph>
<paragraph role="bascode" localize="false" id="bas_id731612371253577">MsgBox SF_String.IsADate(myDate, "YYYY-MM-DD") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id821612371254969">MsgBox IsDate(myDate) 'False</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id821612371254969">MsgBox IsDate(myDate) ' False</paragraph>
</bascode>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
+ <pycode>
+ <paragraph role="pycode" localize="false" id="pyc_id831627248497889">svc = CreateScriptService("String")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id121627248498619">s_date = "2020-12-31"</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id621627248498786">result = svc.IsADate(s_date) # True</paragraph>
+ </pycode>
</section>
<section id="IsAlpha">
- <comment> IsAlpha -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id491582204781995">
- <bookmark_value>String service;IsAlpha</bookmark_value>
- </bookmark>
+ <comment> IsAlpha ---------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id491582204781995">
+ <bookmark_value>String service;IsAlpha</bookmark_value>
+ </bookmark>
<h2 id="hd_id231579881589037" localize="false">IsAlpha</h2>
- <paragraph role="paragraph" id="par_id161579881600317">Returns <literal>True</literal> if all characters in the string are alphabetic.</paragraph>
- <paragraph role="paragraph" id="par_id251579881615469">Alphabetic characters are those characters defined in the <link href="https://unicode.org/reports/tr44/" name="Unicode documentation">Unicode Character Database</link> as <literal>Letter</literal>.</paragraph>
- <h3 id="hd_id121579881624613" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id471579881638941">SF_String.IsAlpha(InputStr As String) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id921579881654036" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id11579881691826"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
- <h3 id="hd_id841579881714210" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="par_id381579881735058">MsgBox SF_String.IsAlpha("àénΣlPµ") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id331579881743363">MsgBox SF_String.IsAlpha("myVar3") 'False</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id161579881600317">Returns <literal>True</literal> if all characters in the string are alphabetic.</paragraph>
+ <paragraph role="paragraph" id="par_id251579881615469">Alphabetic characters are those characters defined in the <link href="https://unicode.org/reports/tr44/" name="Unicode documentation">Unicode Character Database</link> as <literal>Letter</literal>.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id711627160772668">
+ <input>svc.IsAlpha(inputstr: str): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id11579881691826"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="par_id381579881735058">MsgBox SF_String.IsAlpha("àénΣlPµ") ' True</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id331579881743363">MsgBox SF_String.IsAlpha("myVar3") ' False</paragraph>
+ </bascode>
</section>
<section id="IsAlphaNum">
- <comment> IsAlphaNum -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id581582204814414">
- <bookmark_value>String service;IsAlphanum</bookmark_value>
- </bookmark>
+ <comment> IsAlphaNum -------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id581582204814414">
+ <bookmark_value>String service;IsAlphanum</bookmark_value>
+ </bookmark>
<h2 id="hd_id711579883155335" localize="false">IsAlphaNum</h2>
<paragraph role="paragraph" id="par_id421579883181382">Returns <literal>True</literal> if all characters in the string are alphabetic, digits or "_" (underscore). The first character must not be a digit.</paragraph>
- <h3 id="hd_id791579884249419" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id401579884443738">SF_String.IsAlphaNum(InputStr As String) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id171579884263682" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id31579884464101"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
- <h3 id="hd_id981579884354378" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id611579884379482">MsgBox SF_String.IsAlphaNum("_ABC_123456_abcàénΣlPµ") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id551612445915119">MsgBox SF_String.IsAlphaNum("123ABC") 'False</paragraph>
- </bascode>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id981627160850954">
+ <input>svc.IsAlphaNum(inputstr: str): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id31579884464101"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id611579884379482">MsgBox SF_String.IsAlphaNum("_ABC_123456_abcàénΣlPµ") ' True</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id551612445915119">MsgBox SF_String.IsAlphaNum("123ABC") ' False</paragraph>
+ </bascode>
</section>
<section id="IsAscii">
- <comment> IsAscii -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id991582204833033">
- <bookmark_value>String service;IsAscii</bookmark_value>
- </bookmark>
+ <comment> IsAscii ----------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id991582204833033">
+ <bookmark_value>String service;IsAscii</bookmark_value>
+ </bookmark>
<h2 id="hd_id891580039448798" localize="false">IsAscii</h2>
- <paragraph role="paragraph" id="par_id671580039484786">Returns <literal>True</literal> if all characters in the string are Ascii characters.</paragraph>
- <h3 id="hd_id221580039493808" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id471580039537321">SF_String.IsAscii(InputStr As String) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id891580039510727" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id791580039528838"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
- <h3 id="hd_id91580039546153" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id41580039556401">MsgBox SF_String.IsAscii("a%?,25") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id841580039565265">MsgBox SF_String.IsAscii("abcàénΣlPµ") 'False</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id671580039484786">Returns <literal>True</literal> if all characters in the string are Ascii characters.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id931627160994922">
+ <input>svc.IsAscii(inputstr: str): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id791580039528838"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id41580039556401">MsgBox SF_String.IsAscii("a%?,25") ' True</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id841580039565265">MsgBox SF_String.IsAscii("abcàénΣlPµ") ' False</paragraph>
+ </bascode>
</section>
<section id="IsDigit">
- <comment> IsDigit -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id741582204858557">
- <bookmark_value>String service;IsDigit</bookmark_value>
- </bookmark>
+ <comment> IsDigit ---------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id741582204858557">
+ <bookmark_value>String service;IsDigit</bookmark_value>
+ </bookmark>
<h2 id="hd_id321580044756464" localize="false">IsDigit</h2>
- <paragraph role="paragraph" id="par_id861580044805749">Returns <literal>True</literal> if all characters in the string are digits.</paragraph>
- <h3 id="hd_id341580044817581" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id601580044829921">SF_String.IsDigit(InputStr As String) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id571580044844060" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id41580044873043"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
- <h3 id="hd_id741580044902750" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id821580044929100">MsgBox SF_String.IsDigit("123456") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id601580044939971">MsgBox SF_String.IsDigit("_12a") 'False</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id861580044805749">Returns <literal>True</literal> if all characters in the string are digits.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id491627161075258">
+ <input>svc.IsDigit(inputstr: str): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id41580044873043"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id821580044929100">MsgBox SF_String.IsDigit("123456") ' True</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id601580044939971">MsgBox SF_String.IsDigit("_12a") ' False</paragraph>
+ </bascode>
</section>
<section id="IsEmail">
- <comment> IsEmail -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721582204903245">
- <bookmark_value>String service;IsEmail</bookmark_value>
- </bookmark>
+ <comment> IsEmail ----------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id721582204903245">
+ <bookmark_value>String service;IsEmail</bookmark_value>
+ </bookmark>
<h2 id="hd_id601580045208963" localize="false">IsEmail</h2>
- <paragraph role="paragraph" id="par_id521580045221758">Returns <literal>True</literal> if the string is a valid email address.</paragraph>
- <h3 id="hd_id221580045240298" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id791580045251493">SF_String.IsEmail(InputStr As String) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id691580045263571" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id841580045280071"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
- <h3 id="hd_id641580045286520" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id351580045300802">MsgBox SF_String.IsEmail("first.last at something.org") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id511580045308668">MsgBox SF_String.IsEmail("first.last at something.com.br") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id621580045319466">MsgBox SF_String.IsEmail("first.last at something.123") 'False</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id521580045221758">Returns <literal>True</literal> if the string is a valid email address.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id561627161153727">
+ <input>svc.IsEmail(inputstr: str): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id841580045280071"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id351580045300802">MsgBox SF_String.IsEmail("first.last at something.org") ' True</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id511580045308668">MsgBox SF_String.IsEmail("first.last at something.com.br") ' True</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id621580045319466">MsgBox SF_String.IsEmail("first.last at something.123") ' False</paragraph>
+ </bascode>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
+ <pycode>
+ <paragraph role="pycode" localize="false" id="pyc_id921627248625925">svc = CreateScriptService("String")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id671627248629820">bas = CreateScriptService("Basic")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id651627248630083">bas.MsgBox(svc.IsEmail("first.last at something.org")) # True</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id451627248630275">bas.MsgBox(svc.IsEmail("first.last at something.com.br")) # True</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id491627248630514">bas.MsgBox(svc.IsEmail("first.last at something.123")) # False</paragraph>
+ </pycode>
</section>
<section id="IsFileName">
- <comment> IsFileName -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id601582204928759">
- <bookmark_value>String service;IsFileName</bookmark_value>
- </bookmark>
+ <comment> IsFileName -------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id601582204928759">
+ <bookmark_value>String service;IsFileName</bookmark_value>
+ </bookmark>
<h2 id="hd_id941580047025136" localize="false">IsFileName</h2>
- <paragraph role="paragraph" id="par_id41580047039666">Returns <literal>True</literal> if the string is a valid filename in a given operating system.</paragraph>
- <h3 id="hd_id321580047047967" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id601580047059045">SF_String.IsFileName(InputStr As String[, OSName As String]) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id961580047067350" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id801580047079938"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
- <paragraph role="paragraph" id="par_id781580047088954"><emph>OSName</emph>: The operating system name, as a string. It can be WINDOWS, LINUX, MACOSX or SOLARIS.</paragraph>
- <paragraph role="paragraph" id="par_id991612372824234">The default value is the current operating system on which the script is running.</paragraph>
- <h3 id="hd_id281580047193387" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id291580047101783">MsgBox SF_String.IsFileName("/home/user/Documents/a file name.odt", "LINUX") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id761580047111201">MsgBox SF_String.IsFileName("C:\home\a file name.odt", "LINUX") 'False</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id901580047128532">MsgBox SF_String.IsFileName("C:\home\a file name.odt", "WINDOWS") 'True</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id41580047039666">Returns <literal>True</literal> if the string is a valid filename in a given operating system.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id521627161235397">
+ <input>svc.IsFileName(inputstr: str, [osname: str]): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id801580047079938"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
+ <paragraph role="paragraph" id="par_id781580047088954"><emph>osname</emph>: The operating system name, as a string. It can be "WINDOWS", "LINUX", "MACOSX" or "SOLARIS".</paragraph>
+ <paragraph role="paragraph" id="par_id991612372824234">The default value is the current operating system on which the script is running.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id291580047101783">MsgBox SF_String.IsFileName("/home/user/Documents/a file name.odt", "LINUX") ' True</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id761580047111201">MsgBox SF_String.IsFileName("C:\home\a file name.odt", "LINUX") ' False</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id901580047128532">MsgBox SF_String.IsFileName("C:\home\a file name.odt", "WINDOWS") ' True</paragraph>
+ </bascode>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
+ <pycode>
+ <paragraph role="pycode" localize="false" id="pyc_id921627248625144">svc = CreateScriptService("String")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id671627248629099">bas = CreateScriptService("Basic")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id651627248630165">bas.MsgBox(svc.IsFileName("/home/user/Documents/a file name.odt", "LINUX")) # True</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id451627248630094">bas.MsgBox(svc.IsFileName(r"C:\home\a file name.odt", "LINUX")) # False</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id491627248630255">bas.MsgBox(svc.IsFileName(r"C:\home\a file name.odt", "WINDOWS")) # True</paragraph>
+ </pycode>
</section>
<section id="IsHexDigit">
- <comment> IsHexDigit -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id1001582204955266">
- <bookmark_value>String service;IsHexDigit</bookmark_value>
- </bookmark>
+ <comment> IsHexDigit ------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id1001582204955266">
+ <bookmark_value>String service;IsHexDigit</bookmark_value>
+ </bookmark>
<h2 id="hd_id441580047541078" localize="false">IsHexDigit</h2>
- <paragraph role="paragraph" id="par_id911580047551929">Returns <literal>True</literal> if all characters in the string are hexadecimal digits.</paragraph>
- <h3 id="hd_id711580047561024" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id1001580047573400">SF_String.IsHexDigit(InputStr As String) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id931580047579878" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id331580047594144"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
- <paragraph role="paragraph" id="par_id521612377109554">The hexadecimal digits may be prefixed with "0x" or "&H".</paragraph>
- <h3 id="hd_id771580047603896" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id51580047615488">MsgBox SF_String.IsHexDigit("&H00FF") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id251580047624832">MsgBox SF_String.IsHexDigit("08AAFF10") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id281580047636521">MsgBox SF_String.IsHexDigit("0x18LA22") 'False</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id911580047551929">Returns <literal>True</literal> if all characters in the string are hexadecimal digits.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id141627161371952">
+ <input>svc.IsHexDigit(inputstr: str): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id331580047594144"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
+ <paragraph role="paragraph" id="par_id521612377109554">The hexadecimal digits may be prefixed with "0x" or "&H".</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id51580047615488">MsgBox SF_String.IsHexDigit("&H00FF") ' True</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id251580047624832">MsgBox SF_String.IsHexDigit("08AAFF10") ' True</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id281580047636521">MsgBox SF_String.IsHexDigit("0x18LA22") ' False</paragraph>
+ </bascode>
</section>
<section id="IsIBAN">
- <comment> IsIBAN -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id931582204907784">
- <bookmark_value>String service;IsIBAN</bookmark_value>
- </bookmark>
+ <comment> IsIBAN ------------------------------------------------------------------------------------------------ </comment>
+ <bookmark localize="false" branch="index" id="bm_id931582204907784">
+ <bookmark_value>String service;IsIBAN</bookmark_value>
+ </bookmark>
<h2 id="hd_id431580840408317" localize="false">IsIBAN</h2>
- <paragraph role="paragraph" id="par_id791584008420941">Returns <literal>True</literal> if the string is a valid International Bank Account Number (IBAN). The comparison is not case-sensitive.</paragraph>
- <embed href="text/sbasic/shared/03/avail_release.xhp#7.2.method"/>
- <h3 id="hd_id9615004808430925" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id371584008441769">SF_String.IsIBAN(InputStr As String) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id671580840452527" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id951880048466565"> <emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
- <h3 id="hd_id251619526510787" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functvalue"/></h3>
- <paragraph role="paragraph" id="par_id631619526542367"><literal>True</literal> if the string contains a valid IBAN number.</paragraph>
- <h3 id="hd_id321580048473256" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id571500848484444">MsgBox SF_String.IsIBAN("BR15 0000 0000 0000 1093 2840 814 P2") 'returns True</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id791584008420941">Returns <literal>True</literal> if the string is a valid International Bank Account Number (IBAN). The comparison is not case-sensitive.</paragraph>
+ <embed href="text/sbasic/shared/03/avail_release.xhp#7.2.method"/>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id291627161741207">
+ <input>svc.IsIBAN(inputstr: str): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id951880048466565"> <emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functvalue"/>
+ <paragraph role="paragraph" id="par_id631619526542367"><literal>True</literal> if the string contains a valid IBAN number.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id71627249022958">' Basic</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id571500848484444">MsgBox SF_String.IsIBAN("BR15 0000 0000 0000 1093 2840 814 P2") ' True</paragraph>
+ </bascode>
+ <pycode>
+ <paragraph role="pycode" localize="false" id="pyc_id121627249045568"># Python</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id901627249045753">result = svc.IsIBAN("BR15 0000 0000 0000 1093 2840 814 P2") # True</paragraph>
+ </pycode>
</section>
<section id="IsIPv4">
- <comment> IsIPv4 -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id931582204977084">
- <bookmark_value>String service;IsIPv4</bookmark_value>
- </bookmark>
+ <comment> IsIPv4 ------------------------------------------------------------------------------------------------ </comment>
+ <bookmark localize="false" branch="index" id="bm_id931582204977084">
+ <bookmark_value>String service;IsIPv4</bookmark_value>
+ </bookmark>
<h2 id="hd_id431580048408317" localize="false">IsIPv4</h2>
- <paragraph role="paragraph" id="par_id791580048420941">Returns <literal>True</literal> if the string is a valid IP(v4) address.</paragraph>
- <h3 id="hd_id961580048430925" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id371580048441769">SF_String.IsIPv4(InputStr As String) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id671580048452527" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id981580048466565"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
- <h3 id="hd_id321580048473652" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id571580048484444">MsgBox SF_String.IsIPv4("192.168.1.50") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id871580048493061">MsgBox SF_String.IsIPv4("192.168.50") 'False</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id201580048501038">MsgBox SF_String.IsIPv4("255.255.255.256") 'False</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id791580048420941">Returns <literal>True</literal> if the string is a valid IP(v4) address.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id861627161817305">
+ <input>svc.IsIPv4(inputstr: str): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id981580048466565"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id571580048484444">MsgBox SF_String.IsIPv4("192.168.1.50") ' True</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id871580048493061">MsgBox SF_String.IsIPv4("192.168.50") ' False</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id201580048501038">MsgBox SF_String.IsIPv4("255.255.255.256") ' False</paragraph>
+ </bascode>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
+ <pycode>
+ <paragraph role="pycode" localize="false" id="pyc_id831627249268171">svc = CreateScriptService("String")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id981627249268449">bas = CreateScriptService("Basic")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id871627249268596">bas.MsgBox(svc.IsIPv4("192.168.1.50")) # True</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id211627249268763">bas.MsgBox(svc.IsIPv4("192.168.50")) # False</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id571627249268932">bas.MsgBox(svc.IsIPv4("255.255.255.256")) # False</paragraph>
+ </pycode>
</section>
<section id="IsLike">
- <comment> IsLike -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id721582205008767">
- <bookmark_value>String service;IsLike</bookmark_value>
- </bookmark>
+ <comment> IsLike ------------------------------------------------------------------------------------------------ </comment>
+ <bookmark localize="false" branch="index" id="bm_id721582205008767">
+ <bookmark_value>String service;IsLike</bookmark_value>
+ </bookmark>
<h2 id="hd_id791580049073672" localize="false">IsLike</h2>
- <paragraph role="paragraph" id="par_id831580049093038">Returns <literal>True</literal> if the whole input string matches a given pattern containing wildcards.</paragraph>
- <h3 id="hd_id421580049106642" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id21580049118331">SF_String.IsLike(InputStr As String, Pattern As String[, CaseSensitive As Boolean) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id331580049127289" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id141580049142548"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
- <paragraph role="paragraph" id="par_id31580049154551"><emph>Pattern</emph>: The pattern as a string. Wildcard are:</paragraph>
- <list type="unordered">
- <listitem>
- <paragraph id="par_id181612441703306" role="listitem">"?" represents any single character;</paragraph>
- </listitem>
- <listitem>
- <paragraph role="paragraph" id="par_id861612377611438">"*" represents zero, one, or multiple characters.</paragraph>
- </listitem>
- </list>
- <paragraph role="paragraph" id="par_id991580049206617"><emph>CaseSensitive</emph>: Default = <literal>False</literal>.</paragraph>
- <h3 id="hd_id501580049216181" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id541580049238484">MsgBox SF_String.IsLike("aAbB", "?A*") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id821580049249434">MsgBox SF_String.IsLike("C:\a\b\c\f.odb", "?:*.*") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id981580049258743">MsgBox SF_String.IsLike("name:host", "?*@?*") 'False</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id821612378053774">MsgBox SF_String.IsLike("@host", "?*@?*") 'False</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id831580049093038">Returns <literal>True</literal> if the whole input string matches a given pattern containing wildcards.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id951627161917563">
+ <input>svc.IsLike(inputstr: str, pattern: str, [casesensitive: bool]): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id141580049142548"><emph>inputstr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
+ <paragraph role="paragraph" id="par_id31580049154551"><emph>pattern</emph>: The pattern as a string. Wildcards are:</paragraph>
+ <list type="unordered">
+ <listitem>
+ <paragraph id="par_id181612441703306" role="listitem">"?" represents any single character;</paragraph>
+ </listitem>
+ <listitem>
+ <paragraph role="paragraph" id="par_id861612377611438">"*" represents zero, one, or multiple characters.</paragraph>
+ </listitem>
+ </list>
+ <paragraph role="paragraph" id="par_id991580049206617"><emph>casesensitive</emph>: The search can be case sensitive or not (Default = <literal>False</literal>).</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Basic"/>
+ <bascode>
+ <paragraph role="bascode" localize="false" id="bas_id541580049238484">MsgBox SF_String.IsLike("aAbB", "?A*") ' True</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id821580049249434">MsgBox SF_String.IsLike("C:\a\b\c\f.odb", "?:*.*") ' True</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id981580049258743">MsgBox SF_String.IsLike("name:host", "?*@?*") ' False</paragraph>
+ <paragraph role="bascode" localize="false" id="bas_id821612378053774">MsgBox SF_String.IsLike("@host", "?*@?*") ' False</paragraph>
+ </bascode>
+ <embed href="text/sbasic/shared/00000003.xhp#In_Python"/>
+ <pycode>
+ <paragraph role="pycode" localize="false" id="pyc_id831627249268227">svc = CreateScriptService("String")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id981627249268238">bas = CreateScriptService("Basic")</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id871627249268903">bas.MsgBox(svc.IsLike("aAbB", "?A*")) # True</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id211627249268144">bas.MsgBox(svc.IsLike(r"C:\a\b\c\f.odb", "?:*.*")) # True</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id571627249268752">bas.MsgBox(svc.IsLike("name:host", "?*@?*")) # False</paragraph>
+ <paragraph role="pycode" localize="false" id="pyc_id661627249433231">bas.MsgBox(svc.IsLike("@host", "?*@?*")) # False</paragraph>
+ </pycode>
</section>
<section id="IsLower">
- <comment> IsLower -------------------------------------------------------------------------------------------------------------------------- </comment>
- <bookmark xml-lang="en-US" localize="false" branch="index" id="bm_id91582205043650">
- <bookmark_value>String service;IsLower</bookmark_value>
- </bookmark>
+ <comment> IsLower ----------------------------------------------------------------------------------------------- </comment>
+ <bookmark localize="false" branch="index" id="bm_id91582205043650">
+ <bookmark_value>String service;IsLower</bookmark_value>
+ </bookmark>
<h2 id="hd_id621580050021403" localize="false">IsLower</h2>
- <paragraph role="paragraph" id="par_id581580050048679">Returns <literal>True</literal> if all characters in the string are in lowercase. Non-alphabetic characters are ignored.</paragraph>
- <h3 id="hd_id31580050058813" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functsyntax"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id101580050073550">SF_String.IsLower(InputStr As String) As Boolean</paragraph>
- </bascode>
- <h3 id="hd_id421580050086302" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functparameters"/></h3>
- <paragraph role="paragraph" id="par_id751580050122938"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
- <h3 id="hd_id201580050136558" localize="false"><embedvar href="text/sbasic/shared/00000003.xhp#functexample"/></h3>
- <bascode>
- <paragraph role="bascode" localize="false" id="bas_id731580050158022">MsgBox SF_String.IsLower("abc'(-xy4z") 'True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id881580050187982">MsgBox SF_String.IsLower("1234") ' True</paragraph>
- <paragraph role="bascode" localize="false" id="bas_id741580050198046">MsgBox SF_String.IsLower("abcDefg") 'False</paragraph>
- </bascode>
+ <paragraph role="paragraph" id="par_id581580050048679">Returns <literal>True</literal> if all characters in the string are in lowercase. Non-alphabetic characters are ignored.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
+ <paragraph role="paragraph" localize="false" id="par_id901627162072714">
+ <input>svc.IsLower(inputstr: str): bool</input>
+ </paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
+ <paragraph role="paragraph" id="par_id751580050122938"><emph>InputStr</emph>: The string to be checked. If empty, the method returns <literal>False</literal>.</paragraph>
+ <embed href="text/sbasic/shared/00000003.xhp#functexample"/>
+ <bascode>
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list