summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-24 08:32:42 +0200
committerGitHub <noreply@github.com>2019-07-24 08:32:42 +0200
commitaa062c54fcdac6a17e38f3678c886779bce325f9 (patch)
treec578a84dd1fd8285a5250ebfe8907494b02ff5a1 /doc
parent3cbd4337ce5bd3d589cd96e1a371d417be781841 (diff)
parent080c0bb7fea824f231e8972fe1e7f82290a2f453 (diff)
Merge pull request #25090 from Chaosus/string_count
Added String.count method
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/String.xml28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index e513a44b1d..6dc3e35558 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -272,6 +272,34 @@
Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]+1[/code] if greater than, or [code]0[/code] if equal.
</description>
</method>
+ <method name="count">
+ <return type="int">
+ </return>
+ <argument index="0" name="what" type="String">
+ </argument>
+ <argument index="1" name="from" type="int" default="0">
+ </argument>
+ <argument index="2" name="to" type="int" default="0">
+ </argument>
+ </argument>
+ <description>
+ Returns the number of occurrences of substring [code]what[/code] between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used.
+ </description>
+ </method>
+ <method name="countn">
+ <return type="int">
+ </return>
+ <argument index="0" name="what" type="String">
+ </argument>
+ <argument index="1" name="from" type="int" default="0">
+ </argument>
+ <argument index="2" name="to" type="int" default="0">
+ </argument>
+ </argument>
+ <description>
+ Returns the number of occurrences of substring [code]what[/code] (ignoring case) between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used.
+ </description>
+ </method>
<method name="dedent">
<return type="String">
</return>