Skip to content

Instantly share code, notes, and snippets.

@forcewake
Created February 28, 2013 20:26
Show Gist options
  • Save forcewake/5059822 to your computer and use it in GitHub Desktop.
Save forcewake/5059822 to your computer and use it in GitHub Desktop.
namespace MvcBootest.Helpers
{
public class TagsHelper
{
public IList<string> GetTags(string message)
{
return
message.Split(' ').Where(word => word.StartsWith("#")).Select(word => word.Substring(1)).Select(
newTagValue => new Tag
{
Value = newTagValue
}).Select(newTag => newTag.Value).ToList();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment