Logo

Programming-Idioms

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

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.

with Ada.Strings.Fixed;
use Ada.Strings.Fixed;
Blank := Index_Non_Blank (Str) = 0;

New implementation...