String.SwapBytes(Variable) Method

Top 

Description

Re-orders the bytes in a byte stream to convert from a big-endian to a little-endian, or vice versa. This will reverse the order of the characters in the calling String.

 

Timing Precision Mode

This page describes functionality in millisecond timing precision mode.

Click here to see the documentation for this object in nanosecond timing precision mode.

 

Method Signature

String.SwapBytes(

Variable numberOfBytes)

 

 

Arguments

numberOfBytes


Description:

The number of bytes (characters), measured from the beginning of the stream, that will be converted into reverse order ("swapped"). To swap an entire string, this should be equal to the length of the string.

Valid Range:

numberOfBytes > 0

 

 

 

Return Value

Type:

string

 

 

Returns a String containing the re-ordered byte stream.

 

Syntax

myString1 = myString2.SwapBytes(myVariable1);

 

 

Example 1

 

 

Example 2

 

 

Example 3

 

 

See also

String Object

Parsing Dates and Times

Parsing Arbitrary String Data

Parsing Arbitrary String Data