TweetExtensions.ExtractTo Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

ExtractTo(string)

Extract a @mentioned username from the beginning of the provided text (preceded by 0 or more spaces).

public static string ExtractTo(this string text)

Parameters

text
string

text from which to extract a mention.

Returns

string

First username referenced, if any (without the leading @ sign). Returns null if the text does not start with a @mention.