Skip to content

Commit

Permalink
Merge pull request #69821 from Mickeon/the-future-is-now-old-man
Browse files Browse the repository at this point in the history
Update StringName documentation to match String's
  • Loading branch information
akien-mga committed Dec 9, 2022
2 parents 01b501f + 45e991f commit ae86d90
Show file tree
Hide file tree
Showing 2 changed files with 270 additions and 184 deletions.
12 changes: 6 additions & 6 deletions doc/classes/String.xml
Expand Up @@ -185,16 +185,16 @@
[gdscript]
print("Team".find("I")) # Prints -1

print("Potato".find("t")) # Prints 2
print("Potato".find("t", 3)) # Prints 4
print("Potato".find("t", 5)) # Prints -1
print("Potato".find("t")) # Prints 2
print("Potato".find("t", 3)) # Prints 4
print("Potato".find("t", 5)) # Prints -1
[/gdscript]
[csharp]
GD.Print("Team".Find("I")); // Prints -1

GD.Print("Potato".Find("t")); // Prints 2
GD.print("Potato".Find("t", 3)); // Prints 4
GD.print("Potato".Find("t", 5)); // Prints -1
GD.Print("Potato".Find("t")); // Prints 2
GD.print("Potato".Find("t", 3)); // Prints 4
GD.print("Potato".Find("t", 5)); // Prints -1
[/csharp]
[/codeblocks]
[b]Note:[/b] If you just want to know whether the string contains [param what], use [method contains]. In GDScript, you may also use the [code]in[/code] operator.
Expand Down

0 comments on commit ae86d90

Please sign in to comment.