STRORD(3C) — HP-UX
NAME
strord − convert string data order
SYNOPSIS
#include <nl_types.h>
char ∗strord (s1, s2, m)
char ∗s1, ∗s2;
nl_mode m;
DESCRIPTION
The text orientation (mode) of a file can be right-to-left (non-Latin) or left-to-right (Latin). This text orientation can affect the way data is arranged in the file. The data arrangements that result are called screen order and keyboard order (see hpnls(5) for more details).
The strord routine converts the order of characters in s2 from screen to keyboard order or vice versa and places the result in s1. The arguments s1 and s2 point to strings (arrays of characters terminated by a null character). Strord returns s1.
Strord performs the conversion based on mode information indicated by the argument m. The argument m is of type nl_mode found in the header file <nl_types.h>. The mode argument can have two possible values: NL_LATIN and NL_NONLATIN.
If the mode argument is NL_LATIN, the text orientation is left-to-right and all non-Latin sub-strings are reversed. Non-Latin sub-strings are any number of contiguous right-to-left language characters. Non-Latin sub-strings are delimited by ASCII characters.
Similarly, if the mode argument is NL_NONLATIN, the text orientation is right-to-left and all Latin sub-strings are reversed. Latin sub-strings are any number of contiguous printable ASCII characters. Latin sub-strings are delimited by right-to-left language characters and ASCII control codes.
Some right-to-left languages have a duplicate set of digits called alternative numbers. Alternative numbers always have a left-to-right orientation.
WARNINGS
Strord does not check for overflow of the array pointed to by s1.
AUTHOR
Strord was developed by HP.
SEE ALSO
nl_init(3C), hpnls(5), environ(5), forder(1), nljust(1).
INTERNATIONAL SUPPORT
8-bit data.
Hewlett-Packard Company — May 11, 2021