Logo

Programming-Idioms

History of Idiom 110

Idiom #110 Check if string is blank

Set the boolean blank to true if the string s is empty, or null, or contains only whitespace ; false otherwise.

#Edit dateEdit SummaryAuthor
👁 Δ 109 2023-05-10, 20:17 [Ruby] Original throws an error when s is nil vijfhoek
👁 Δ 108 2023-03-23, 09:45 +keywords programming-idioms.org
👁 Δ 107 2023-02-27, 21:32 New Lua implementation by user [ferdinandor] ferdinandor
👁 Δ 106 2023-02-01, 10:11 [Python] Added Demo URL programming-idioms.org
👁 Δ 105 2023-01-28, 22:21 [Python] Added Doc URL Luk-ESC
👁 Δ 104 2023-01-26, 02:36 [Java] Edited the explanation. reilas
👁 Δ 103 2023-01-25, 12:39 [Java] The explanation was incorrectly formatted; the underline doesn't work on \ and + reilas
👁 Δ 102 2023-01-25, 12:32 New Java implementation by user [reilas] reilas
👁 Δ 101 2022-12-01, 10:36 Linked to idiom #320 [Test if string is empty] programming-idioms.org
👁 Δ 100 2022-09-03, 10:24 [Ruby] Added Demo URL programming-idioms.org
👁 Δ 99 2022-09-03, 10:24 Admin deletes impl 5737: No such method blank programming-idioms.org
👁 Δ 98 2022-09-03, 10:19 [Ruby] Added Doc URL for strip programming-idioms.org
👁 Δ 97 2022-07-02, 18:55 Admin deletes impl 5792: Doesn't work, see http://codepad.org/nFSQUCeb programming-idioms.org
👁 Δ 96 2022-07-02, 12:02 [Lua] Forgot empty strings and nil TJC games
👁 Δ 95 2022-07-02, 11:59 [Lua] Fixing an error and trimming whitespace. 14 bytes! TJC games
👁 Δ 94 2022-07-02, 11:56 New Lua implementation by user [TJC games] TJC games
👁 Δ 93 2022-05-26, 07:51 Admin deletes impl 5738: See 5737 and 1632 instead programming-idioms.org
👁 Δ 92 2022-05-25, 19:29 New Ruby implementation by user [Joe] Joe
👁 Δ 91 2022-05-25, 19:29 New Ruby implementation by user [Joe] Joe
👁 Δ 90 2022-05-23, 18:54 [Rust] +DemoURL programming-idioms.org
👁 Δ 89 2022-05-23, 17:23 New Rust implementation by user [Li Ding] Li Ding
👁 Δ 88 2022-05-05, 08:34 Restored version 86: Doesn't work, see http://codepad.org/ZJgH1VAT programming-idioms.org
👁 Δ 87 2022-04-25, 18:46 New Lua implementation by user [_] _
👁 Δ 86 2022-03-15, 14:51 [Java] strip() better than trim() programming-idioms.org
👁 Δ 85 2022-03-03, 23:35 [Scala] +DemoURL programming-idioms.org
👁 Δ 84 2022-03-03, 22:41 [Dart] +DemoURL programming-idioms.org
👁 Δ 83 2022-03-03, 22:39 [Dart] +DemoURL programming-idioms.org
👁 Δ 82 2022-02-24, 18:08 [Java] Better demo link (shows code) programming-idioms.org
👁 Δ 81 2022-02-24, 18:08 [Java] Better demo link (shows code) programming-idioms.org
👁 Δ 80 2022-02-24, 18:07 [Python] Better demo link (shows code) programming-idioms.org
👁 Δ 79 2022-02-24, 18:07 [Java] Better demo link (shows code) programming-idioms.org
👁 Δ 78 2022-02-01, 23:52 [Kotlin] Update demo with better example string AlfRichter
👁 Δ 77 2022-02-01, 23:51 [Kotlin] Add Doc and Demo AlfRichter
👁 Δ 76 2021-12-23, 09:01 Linked to idiom #219 [Replace multiple spaces with single space] programming-idioms.org
👁 Δ 75 2021-12-14, 11:27 Restored version 73: No. programming-idioms.org
👁 Δ 74 2021-12-14, 09:53 [Dart] e s
👁 Δ 73 2021-11-07, 21:19 Restored version 71: No. programming-idioms.org
👁 Δ 72 2021-11-07, 03:51 [Java] 11 111
👁 Δ 71 2021-09-24, 12:18 Lead: better style programming-idioms.org
👁 Δ 70 2021-09-24, 09:28 New Smalltalk implementation by user [krono] krono
👁 Δ 69 2021-09-15, 15:46 Linked to idiom #274 [Remove all whitespace characters] programming-idioms.org
👁 Δ 68 2021-08-30, 20:54 [Cobol] test testee
👁 Δ 67 2021-08-19, 09:06 [C#] Remove unnecessary import zqwnvl
👁 Δ 66 2021-08-19, 09:05 [VB] Implement the lead fully; add links zqwnvl
👁 Δ 65 2021-08-17, 11:21 [Scala] Added Option(s).forall as without it a null string will raise a NPE on .trim Anonymous
👁 Δ 64 2021-08-15, 23:40 New Scheme implementation by user [srcreigh] srcreigh
👁 Δ 63 2021-03-04, 08:22 Admin deletes impl 1667: Doesn't work. See http://codepad.org/uOOuuNQ6 , https://repl.it/join/ivigzcxi-progidioms , http... programming-idioms.org
👁 Δ 62 2021-03-03, 05:08 [Lua] sss sss
👁 Δ 61 2021-02-26, 08:59 [Python] Handle None. +DemoURL programming-idioms.org
👁 Δ 60 2021-01-20, 11:58 [Java] +DocURL for trim() programming-idioms.org
👁 Δ 59 2020-12-28, 22:41 [C] +DocURL isspace programming-idioms.org
👁 Δ 58 2020-12-11, 07:28 New C implementation by user [Arnie97] Arnie97
👁 Δ 57 2020-12-09, 14:42 [Rust] +DemoURL programming-idioms.org
👁 Δ 56 2020-11-26, 12:26 [Java] +DemoURL programming-idioms.org
👁 Δ 55 2020-11-26, 12:14 New Java implementation by user [programming-idioms.org] programming-idioms.org
👁 Δ 54 2020-11-26, 12:13 [Java] +DemoURL programming-idioms.org
👁 Δ 53 2020-10-10, 21:19 New Obj-C implementation by user [OC] OC
👁 Δ 52 2020-09-30, 09:01 [Java] null check programming-idioms.org
👁 Δ 51 2020-08-09, 18:01 New Dart implementation by user [programming-idioms.org] programming-idioms.org
👁 Δ 50 2020-08-09, 18:00 Restored version 48 programming-idioms.org
👁 Δ 49 2020-07-28, 12:05 [Dart] shorter and cleaner code, that also might teach dart operators Cukrus
👁 Δ 48 2020-02-09, 16:35 New Dart implementation by user [areille] areille
👁 Δ 47 2019-10-01, 20:27 New Kotlin implementation by user [tomble] tomble
👁 Δ 46 2019-09-29, 01:38 New VB implementation by user [EvilGenius] EvilGenius
👁 Δ 45 2019-09-27, 21:39 [Cobol] fix Roie8
👁 Δ 44 2019-09-27, 21:12 New Cobol implementation by user [Roie8] Roie8
👁 Δ 43 2019-09-27, 11:25 New Clojure implementation by user [MrEbbinghaus] MrEbbinghaus
👁 Δ 42 2019-09-27, 10:10 New Erlang implementation by user [nopeslide] nopeslide
👁 Δ 41 2019-09-26, 20:40 [Python] remove unnecessary complication foo
👁 Δ 40 2019-09-26, 20:22 New Fortran implementation by user [tkoenig] tkoenig
👁 Δ 39 2019-09-26, 18:22 [Python] Explicit is better than implicit. Anonymous
👁 Δ 38 2019-09-26, 17:59 [Cpp] align curly bracket arouene
👁 Δ 37 2019-09-26, 17:58 [Python] take None into account justafoo
👁 Δ 36 2019-09-26, 17:57 [JS] don't overuse regex justafoo
👁 Δ 35 2019-09-26, 17:56 [JS] always default to const instead of let justafoo
👁 Δ 34 2019-09-26, 17:55 [Python] better fix justafoo
👁 Δ 33 2019-09-26, 17:54 [Python] fix justafoo
👁 Δ 32 2019-09-26, 17:50 New Cpp implementation by user [arouene] arouene
👁 Δ 31 2019-09-26, 16:31 New Lisp implementation by user [foobar] foobar
👁 Δ 30 2019-09-26, 13:58 New Csharp implementation by user [polyfill] polyfill
👁 Δ 29 2019-09-26, 13:55 New Csharp implementation by user [jakea] jakea
👁 Δ 28 2019-02-02, 02:48 New Java implementation by user [Debaran] Debaran
👁 Δ 27 2019-02-02, 02:47 [Rust] Creating new var Debaran
👁 Δ 26 2019-02-02, 02:21 New Scala implementation by user [Debaran] Debaran
👁 Δ 25 2019-01-23, 19:07 New JS implementation by user [1.7.4] 1.7.4
👁 Δ 24 2018-03-21, 21:21 New Elixir implementation by user [Okx] Okx
👁 Δ 23 2016-08-11, 20:12 [Rust] We assume blank has already be defined Reiner Martin
👁 Δ 22 2016-08-11, 20:10 New Rust implementation by user [Reiner Martin] Reiner Martin
👁 Δ 21 2016-04-07, 08:06 [Lua] explain the pattern
👁 Δ 20 2016-04-07, 08:05 New Lua implementation by user [Nepta]
👁 Δ 19 2016-04-06, 19:16 New Ruby implementation by user [steenslag]
👁 Δ 18 2016-02-23, 21:00 [PHP] 2 ways -> 2 distinct implementations
👁 Δ 17 2016-02-23, 21:00 New PHP implementation by user [programming-idioms.org]
👁 Δ 16 2016-02-23, 14:32 [PHP] conciseness
👁 Δ 15 2016-02-23, 13:33 New PHP implementation by user [AgillaDev]
👁 Δ 14 2016-02-18, 16:58 New Haskell implementation by user [antalsz]
👁 Δ 13 2016-02-16, 23:21 New Haskell implementation by user [antalsz]
👁 Δ 12 2016-02-16, 23:10 New Python implementation by user [TinyFawks]
👁 Δ 11 2016-02-16, 21:08 New Ada implementation by user [Smaehtin]
👁 Δ 10 2016-02-16, 19:14 New Haskell implementation by user [JH]
👁 Δ 9 2016-01-15, 15:49 New Pascal implementation by user [Bart]
👁 Δ 8 2016-01-09, 17:08 New D implementation by user [piou]
👁 Δ 7 2016-01-08, 09:21 [Perl] Only 1 solution per impl
👁 Δ 6 2016-01-07, 19:44 [Perl] Missed "or contains whitespace" in original post
👁 Δ 5 2016-01-07, 19:40 New Perl implementation by user [Roboticus]
👁 Δ 4 2016-01-06, 23:16 [Go] Fixed import
👁 Δ 3 2015-12-29, 22:33 New Go implementation by user [programming-idioms.org]
👁 Δ 2 2015-12-29, 22:25 [Java]Typo Common -> Commons
1 2015-12-29, 22:24 Idiom creation by user [programming-idioms.org]