This version is out of date, covering development from v9.0.0 to v9.3.0. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

String.empty


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Property   [other Property type actions]

 Item   [operators of similar scope]

 Non-query Boolean   [other Non-query Boolean operators]

 Baseline

 


String.empty()

This returns a Boolean depending on whether the string is empty. If empty, the return value is true, if the attribute has content then false is returned.

$MyString = ""; $MyBoolean = $MyString.empty; $MyBoolean is set to true.

$MyString = "hello"; $MyBoolean = $MyString.empty; $MyBoolean is set to false.

This operator can also be used on other attribute data types that are string-like, URL, File, Action, Color, etc., and which have no value at all by default. However, for a Number or Date, the default values of 0 or never, coerce to a literal string of "0" or "never" so the .empty() test does not work the same way. For the latter types, use the short Boolean test form, !AttributeName.