12-26-2025, 06:11 PM
(This post was last modified: 12-26-2025, 07:30 PM by Kernelpanic.)
It's all quite complicated. If I understand correctly, certain characters in a new string need to be rearranged. Why not do it like this?
String strWort is reversed, and strZahl is rearranged.
PS: And that's grammatically correct too: Spiessbraten. Damn!
String strWort is reversed, and strZahl is rearranged.
PS: And that's grammatically correct too: Spiessbraten. Damn!

Code: (Select All)
'Jetzt ist es auch grammatikalisch korrekt: Spiessbraten, nicht SpiessBraten
strWortNeu = "S" + Right$(strWort, 5) + "b" + Right$(Left$(strWort, 6), 5)
Print strWortNeu
Code: (Select All)
Option _Explicit
Dim As String strWort, strWortNeu, strZahl, strZahlNeu
strWort = "Bratenspiess"
strZahl = "12345678"
Print Left$(strWort, 6)
Print Right$(strWort, 6)
Print
strWortNeu = Right$(strWort, 6) + Left$(strWort, 6)
Print strWortNeu
Print
Print strZahl
strZahlNeu = Left$(strZahl, 1) + Mid$(strZahl, 6, 1) + Mid$(strZahl, 3, 1) + Mid$(strZahl, 8, 1)
Print
Print strZahlNeu
End

