UtilHtmlIsLink(String, LinkifyPlugins) Method

Determine whether the source value is a link.

This function internally uses linkify JavaScript library (https://linkify.js.org/).

Note that linkify is not 100% spec compliant, so this function may return some false positives or false negatives.

Definition

Namespace: DevCase.Core.DataProcessing.Html
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static bool IsLink(
	string str,
	LinkifyPlugins plugins = LinkifyPlugins.None
)

Parameters

str  String
The source value.
plugins  LinkifyPlugins  (Optional)
Optional plugin flags that enables detection of additional link types.

By default this function only detects domain urls and email addresses.

Default value: None

Return Value

Boolean
Returns True if the source value is a link; otherwise, False.

Remarks

Note: To use this functionality you need to install this nuget package:

Microsoft.ClearScript.V8

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also