ma**@aoe6.net wrote:
Hi,
I'm writing an application that gets a string as an input from the
user, and creates an image with this string.
The library that creates the image doesn't recognize if the string is
a right-to-left string, so in such case, I need to create a mirror
string.
How can I know if the string that I got from the user is in a BiDi
language?
The internal representation of a string has nothing to do with the
direction of writing on display or input devices such as user interface
text boxes and edit controls.
A non-empty string is an object which has a first character and a last
character. These positions are abstract; they are neither left nor
right. There is no such thing as a "right to left" string. (Or there
shouldn't be. Someone out there is probably working with data in this
naive way. There is no bottom to the stupidity in the computing field).
A string object could have a display attribute which indicates how it's
to be rendered. However, standard C++ strings are not required to have
any such attribute.
If you're working with some kind of UI tookit which has these strings,
find the forum where that toolkit is discussed.