Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

StringUtils.Surround(Object, Object) Method

Surrounds (prepends and appends) the string value of the supplied fix to the supplied target.

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

Parameters

fix
The prefix and suffix that respectively will be prepended and appended to the target 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.

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