StringExtensionsRotate Method
Rotates the position of the characters in a String.
Namespace: DevCase.Extensions.StringExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static string Rotate(
this string sender,
StringDirection direction,
int positions
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function Rotate (
sender As String,
direction As StringDirection,
positions As Integer
) As String
Dim sender As String
Dim direction As StringDirection
Dim positions As Integer
Dim returnValue As String
returnValue = sender.Rotate(direction,
positions)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
static String^ Rotate(
String^ sender,
StringDirection direction,
int positions
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member Rotate :
sender : string *
direction : StringDirection *
positions : int -> string
No code example is currently available or this language may not be supported.
- sender String
-
The source String.
- direction StringDirection
-
A StringDirection that determines the rotation direction.
- positions Int32
-
The amount of character positions to rotate.
String
The rotated String.
In Visual Basic and C#, you can call this method as an instance method on any object of type
String. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Dim str As String = "Hello World".Rotate(StringDirection.Right, 1)
MessageBox.Show(str)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
ArgumentOutOfRangeException
|
Value bigger than 0 is required.;positions
|
ArgumentOutOfRangeException
|
Value smaller than the source string length is required.;positions
|
InvalidEnumArgumentException
|
direction
|