Ensures returned string is not null or empty.

Namespace:  Sasa.String
Assembly:  Sasa (in Sasa.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function IfNullOrEmpty ( _
	s As String, _
	otherwise As String _
) As String
C#
public static string IfNullOrEmpty(
	string s,
	string otherwise
)
Visual C++
public:
static String^ IfNullOrEmpty(
	String^ s, 
	String^ otherwise
)
JavaScript
Sasa.String.StringExt.ifNullOrEmpty = function(s, otherwise);

Parameters

s
Type: System..::.String
The string to test.
otherwise
Type: System..::.String
The string to return if 's is null or empty.

Return Value

Returns the string if the not null or of length 0, or 'otherwise' otherwise.

See Also