Skip to content

Latest commit

 

History

History
15 lines (12 loc) · 477 Bytes

README.md

File metadata and controls

15 lines (12 loc) · 477 Bytes

Shaman.CommonExtensions

Commonly-used utility methods.

using Shaman;

"something(1)".CaptureBetween("(", ")"); // returns "1"
something.RecursiveEnumeration(x => x.Parent); // gets the root
"something".RegexReplace("[aeiou]", "_"); // returns "s_m_th_ng"
"something".TrimStart("some"); // returns "thing"
"something".TrimEnd("thing"); // returns "some"
"something".Capture("s(.*)g"); // returns "omethin"

"something".In(arr); // like arr.Contains("something")