summaryrefslogtreecommitdiffstats
path: root/doc/classes
diff options
context:
space:
mode:
authorelle <elle@catgirl.software>2024-09-16 21:50:34 +0930
committerelle <elle@catgirl.software>2024-09-16 21:51:18 +0930
commit90aad071f5998f2412a64f281a23b5c8c98b776f (patch)
tree1eebb3c4a992671a81c0c38a0b617fefa331c6b7 /doc/classes
parent6daa6a8513c5debb1faa6f6ca48a218ceb741d87 (diff)
downloadredot-engine-90aad071f5998f2412a64f281a23b5c8c98b776f.tar.gz
Remove outdated note about `not` operator with String and StringName
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/String.xml2
-rw-r--r--doc/classes/StringName.xml2
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index d99eaa64a6..40f08dafe6 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -6,7 +6,7 @@
<description>
This is the built-in string Variant type (and the one used by GDScript). Strings may contain any number of Unicode characters, and expose methods useful for manipulating and generating strings. Strings are reference-counted and use a copy-on-write approach (every modification to a string returns a new [String]), so passing them around is cheap in resources.
Some string methods have corresponding variations. Variations suffixed with [code]n[/code] ([method countn], [method findn], [method replacen], etc.) are [b]case-insensitive[/b] (they make no distinction between uppercase and lowercase letters). Method variations prefixed with [code]r[/code] ([method rfind], [method rsplit], etc.) are reversed, and start from the end of the string, instead of the beginning.
- [b]Note:[/b] In a boolean context, a string will evaluate to [code]false[/code] if it is empty ([code]""[/code]). Otherwise, a string will always evaluate to [code]true[/code]. The [code]not[/code] operator cannot be used. Instead, [method is_empty] should be used to check for empty strings.
+ [b]Note:[/b] In a boolean context, a string will evaluate to [code]false[/code] if it is empty ([code]""[/code]). Otherwise, a string will always evaluate to [code]true[/code].
</description>
<tutorials>
<link title="GDScript format strings">$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html</link>
diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml
index 1a891de05f..3a2b492496 100644
--- a/doc/classes/StringName.xml
+++ b/doc/classes/StringName.xml
@@ -9,7 +9,7 @@
See also [NodePath], which is a similar concept specifically designed to store pre-parsed scene tree paths.
All of [String]'s methods are available in this class too. They convert the [StringName] into a string, and they also return a string. This is highly inefficient and should only be used if the string is desired.
[b]Note:[/b] In C#, an explicit conversion to [code]System.String[/code] is required to use the methods listed on this page. Use the [code]ToString()[/code] method to cast a [StringName] to a string, and then use the equivalent methods in [code]System.String[/code] or [code]StringExtensions[/code].
- [b]Note:[/b] In a boolean context, a [StringName] will evaluate to [code]false[/code] if it is empty ([code]StringName("")[/code]). Otherwise, a [StringName] will always evaluate to [code]true[/code]. The [code]not[/code] operator cannot be used. Instead, [method is_empty] should be used to check for empty [StringName]s.
+ [b]Note:[/b] In a boolean context, a [StringName] will evaluate to [code]false[/code] if it is empty ([code]StringName("")[/code]). Otherwise, a [StringName] will always evaluate to [code]true[/code].
</description>
<tutorials>
</tutorials>