Click or drag to resize

StringExtensionsFind Method (String, String, Int32, Boolean)

Find the first occurrence of a substring. Optionally, the search starting position can be passed.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static int Find(
	this string instance,
	string what,
	int from = 0,
	bool caseSensitive = true
)

Parameters

instance
Type: SystemString

[Missing <param name="instance"/> documentation for "M:Godot.StringExtensions.Find(System.String,System.String,System.Int32,System.Boolean)"]

what
Type: SystemString

[Missing <param name="what"/> documentation for "M:Godot.StringExtensions.Find(System.String,System.String,System.Int32,System.Boolean)"]

from (Optional)
Type: SystemInt32

[Missing <param name="from"/> documentation for "M:Godot.StringExtensions.Find(System.String,System.String,System.Int32,System.Boolean)"]

caseSensitive (Optional)
Type: SystemBoolean

[Missing <param name="caseSensitive"/> documentation for "M:Godot.StringExtensions.Find(System.String,System.String,System.Int32,System.Boolean)"]

Return Value

Type: Int32
The starting position of the substring, or -1 if not found.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also