toBool


Description:

public static Result<bool,Error> toBool (string s)

Converts string to bool.

Accepted values: "true", "false", "1", "0" (case-insensitive).

Parameters:

s

source text.

Returns:

Result.ok(parsed bool), or Result.error(ConvertError.PARSE) when parsing fails.