Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Vb

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.

Dim blank As Boolean = String.IsNullOrWhitespace(s)
with Ada.Strings.Fixed;
use Ada.Strings.Fixed;
Blank := Index_Non_Blank (Str) = 0;

New implementation...