Function WordSwap() Foundation

Swaps adjacent words (2 byte sequences) in a string.

Syntax
WordSwap( <cString>     , ;
          [<lSwapBytes>]  ;  // Default: .F.
        ) --> cResultString
Return

Returns a string where all adjacent words (2 byte sequences) have been swapped: "ABcdEFgh" -> "cdABghEF"

If <lSwapBytes> is set .T. the bytes of a word are swapped, too: "ABcdEFgh" -> "dcBAhgFE"

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.