Logo

Programming-Idioms

History of Idiom 97 > diff from v40 to v41

Edit summary for version 41 by OstravaBro:
New Clojure implementation by user [OstravaBro]

Version 40

2019-10-14, 12:27:56

Version 41

2020-04-29, 09:33:53

Idiom #97 Check string suffix

Set boolean b to true if string s ends with string suffix, false otherwise.

Illustration

Idiom #97 Check string suffix

Set boolean b to true if string s ends with string suffix, false otherwise.

Illustration
Extra Keywords
tail
Extra Keywords
tail
Imports
(require '[clojure.string :as str])
Code
(let [b (str/ends-with? s suffix)]
   ; ...  
 )