Skip to content

Commit 435db9c

Browse files
committed
Add str/ends-with?, fixes #440
1 parent 864b99a commit 435db9c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/squint/string.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ export function starts_with_QMARK_(s, substr) {
5858
return s.startsWith(substr);
5959
}
6060

61+
export function ends_with_QMARK_(s, substr) {
62+
return s.endsWith(substr);
63+
}
64+
6165
const escapeRegex = function(s) {
6266
return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1').replace(/\x08/g, '\\x08');
6367
};

0 commit comments

Comments
 (0)