I have two string same as below: I want to concate...
# android
t
I have two string same as below: I want to concatenate two strings together in correct concatenation order. but I don't know why after concatenating the above two strings it is reversed. Does anyone have a solution to this problem?
s
does
str2
contain Arabic, Hebrew, or Farsi characters? I cannot recognize them. These languages are read from right to left and it is probably affecting your string representation
actually this is what the IDE is telling you on top
t
there are 2 string as below:
Copy code
val str2 = " היטצ "
val str3 = "ABC"
s
I understand that
str2
variable contains characters read from right to left, instead of left to right, correct? This is probably what makes the concatenation to be represented wrong
p
Could it be an IDE-related issue? https://pl.kotl.in/vSu1AF01S
r
@Tran Thang Looks like str2 is Hebrew (RTL) and str3 (LTR). Can you try String template println("$str2$str3") and see how it looks like?
You can choose the direction from the blue bar from IntellJ.