Click or drag to resize
StringExtensionsIndexOfCSafe Method (String, String, StringComparison)

Note: This API is now obsolete.

Reports the index of the first occurrence of the specified string in the current String object. This method is culture safe - it fixes some problems with different cultures.

Namespace: CMS.Base
Assembly: CMS.Base (in CMS.Base.dll) Version: 11.0.0
Syntax
C#
[ObsoleteAttribute("Use method String.IndexOf(String, StringComparison) instead")]
public static int IndexOfCSafe(
	this string value,
	string str,
	StringComparison comparison
)

Parameters

value
Type: SystemString
String object
str
Type: SystemString
String to find
comparison
Type: SystemStringComparison
Comparison type

Return Value

Type: Int32

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