Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

StringUtils.Surround(Object, Object, Object) Method

Surrounds (prepends and appends) the string values of the supplied prefix and suffix to the supplied target.

[Visual Basic]
Public Overloads Shared Sub Surround( _
   ByVal prefix As Object, _
   ByVal target As Object, _
   ByVal suffix As Object _
)
[C#]
public static string Surround(
   object prefix,
   object target,
   object suffix
);

Parameters

prefix
The value that will be prepended to the target. If this value is not a String value, it's attendant ToString value will be used.
target
The target that is to be surrounded. If this value is not a String value, it's attendant ToString value will be used.
suffix
The value that will be appended to the target. If this value is not a String value, it's attendant ToString value will be used.

Return Value

The surrounded string.

Remarks

The return value of this method call is always guaranteed to be non a null reference (Nothing in Visual Basic). If every value passed as a parameter to this method is a null reference (Nothing in Visual Basic), the Empty string will be returned.

See Also

StringUtils Class | Spring.Util Namespace | StringUtils.Surround Overload List