This version is out of date, covering development from v9.5.0 to v9.7.3. 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.failed()


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Last Altered: 

 Function  [other Function type actions]

 Item  [operators of similar scope]

 Stream parsing  [other Stream parsing operators]

 Baseline

 As at baseline


Syntax note: Operators without any defined mandatory arguments may omit their empty closing parentheses


String.failed()

String.failed

.failed tests for a failed Stream processing action String.try{}, including an explicit fail() call. It returns true if the current operation has failed, and false otherwise.

When processing a string, it may be that the string is not what was expected. Thus the .failed operator raises a flag to say this process did not work.

A .failed flag is reset to false when the current try{} expires, or when the current action is complete.

For example, to test if a 'try' sequence has failed:

	if ( $MyString.try{ … }.failed() ) {
		$Color="bright red";
	}