Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

StringUtils.HasLength Method

Checks if a string has length.

[Visual Basic]
Public Shared Sub HasLength( _
   ByVal target As String _
)
[C#]
public static bool HasLength(
   string target
);

Parameters

target
The string to check, may be a null reference (Nothing in Visual Basic).

Return Value

true if the string has length and is not a null reference (Nothing in Visual Basic).

Example

          [C#]
StringUtils.HasLength(null) = false
StringUtils.HasLength("") = false
StringUtils.HasLength(" ") = true
StringUtils.HasLength("Hello") = true

See Also

StringUtils Class | Spring.Util Namespace