Validate a recognized textual boolean token.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_validate_bool

Purpose

Validate a recognized textual boolean token.

Description

This validates both affirmative and negative values; use sgnd_is_true to test truthiness.

Arguments

  • $1 — Candidate token, case-insensitive.

Returns

  • 0 for y/yes/n/no/true/false/1/0; 1 otherwise.

Usage

  sgnd_validate_bool "false"