Skip to content

Commit 0dcd74c

Browse files
authored
Create HasSuffix.fs (#23)
1 parent a0ea976 commit 0dcd74c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

HasSuffix.fs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module HasSuffix =
2+
/// <summary>
3+
/// Reports string has specified suffix or not.
4+
/// </summary>
5+
let HasSuffix (s: string, suffix: string) =
6+
s.Length >= suffix.Length && s.Substring(s.Length-suffix.Length) = suffix

0 commit comments

Comments
 (0)