Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Are sub-strings strings?
#13
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!  Tongue
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
Reply


Messages In This Thread
Are sub-strings strings? - by PhilOfPerth - 12-26-2025, 04:14 AM
RE: Are sub-strings strings? - by ahenry3068 - 12-26-2025, 04:34 AM
RE: Are sub-strings strings? - by PhilOfPerth - 12-26-2025, 04:44 AM
RE: Are sub-strings strings? - by ahenry3068 - 12-26-2025, 04:50 AM
RE: Are sub-strings strings? - by SMcNeill - 12-26-2025, 06:01 AM
RE: Are sub-strings strings? - by Petr - 12-26-2025, 10:41 AM
RE: Are sub-strings strings? - by justsomeguy - 12-26-2025, 11:08 AM
RE: Are sub-strings strings? - by Dav - 12-26-2025, 03:56 PM
RE: Are sub-strings strings? - by SMcNeill - 12-26-2025, 05:06 PM
RE: Are sub-strings strings? - by bplus - 12-26-2025, 05:15 PM
RE: Are sub-strings strings? - by SMcNeill - 12-26-2025, 05:20 PM
RE: Are sub-strings strings? - by Petr - 12-26-2025, 05:57 PM
RE: Are sub-strings strings? - by Kernelpanic - 12-26-2025, 06:11 PM
RE: Are sub-strings strings? - by Dav - 12-26-2025, 07:05 PM
RE: Are sub-strings strings? - by bplus - 12-26-2025, 08:43 PM
RE: Are sub-strings strings? - by SMcNeill - 12-26-2025, 09:32 PM
RE: Are sub-strings strings? - by Pete - 12-26-2025, 09:50 PM
RE: Are sub-strings strings? - by Kernelpanic - 12-26-2025, 10:42 PM
RE: Are sub-strings strings? - by SMcNeill - 12-26-2025, 11:24 PM
RE: Are sub-strings strings? - by Kernelpanic - 12-27-2025, 01:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Print strings with accents and special chars Ikerkaz 8 678 12-20-2025, 09:28 PM
Last Post: TempodiBasic

Forum Jump:


Users browsing this thread: 1 Guest(s)