RosettaCodeData/Task/String-matching/PowerShell/string-matching.psh
2015-02-20 09:02:09 -05:00

5 lines
169 B
Text

"spicywiener".StartsWith("spicy")
"spicywiener".Contains("icy")
"spicywiener".EndsWith("wiener")
"spicywiener".IndexOf("icy")
[regex]::Matches("spicywiener", "i").count