Click or drag to resize

ConditionMethodsStartsWith Method

Gets or sets a value indicating whether the second string is a prefix of the first one.

Namespace:  NLog.Conditions
Assembly:  NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntax
public static bool StartsWith(
	string? haystack,
	string? needle,
	bool ignoreCase = true
)

Parameters

haystack
Type: SystemString
The first string.
needle
Type: SystemString
The second string.
ignoreCase (Optional)
Type: SystemBoolean
Optional. If true (default), case is ignored; if false, case is significant.

Return Value

Type: Boolean
true when the second string is a prefix of the first string, false otherwise.
See Also