Verfasst: 24.10.2006 22:55
sumindes ferwendet er keine falsen apostrofs
Das deutsche PureBasic-Forum
https://www.purebasic.fr/german/
Code: Alles auswählen
prokedure!!!1!!!!1!s lkase(strink!!!1!!!!1!s)
statik first!!!1!!!!1!l = 0 dim khars!!!1!!!!1!k(25)
protekted *k!!!1!!!!1!kharakter a!!!1!!!!1!l
if first = 0
for a = 0 to 25
selekt a
kase 65 to 90
khars(a) = a + 32
kase 138 140 142
khars(a) = a + 16
kase 159
khars(a) = 25
kase 192 to 214
khars(a) = a + 32
kase 216 to 2
khars(a) = a + 32
default
khars(a) = a
endselekt
next
first = 1
endif
*k = @strink
while *k\k
if *k\k <= 25
*k\k = khars(*k\k)
endif
*k + siseof(kharakter)
wend
prokedurereturn strink
endprokedure
prokedure!!!1!!!!1!s notdenunk(strink!!!1!!!!1!s)
protekted result!!!1!!!!1!s *k!!!1!!!!1!kharakter = @strink fokal!!!1!!!!1!l = 0
while *k\k
if fokal = 0 or khr(*k\k) <> "h" result + khr(*k\k) endif
if findstrink("aeiouaaaaeeeiiioooouuuu" khr(*k\k) 1) fokal = 1 else fokal = 0 endif
*k + siseof(kharakter)
wend
prokedurereturn result
endprokedure
prokedure!!!1!!!!1!s notferdoplunk(strink!!!1!!!!1!s)
protekted result!!!1!!!!1!s *k!!!1!!!!1!kharakter = @strink lk!!!1!!!!1!k
lk = 0
while *k\k
if lk <> *k\k result + khr(*k\k) endif
lk = *k\k
*k + siseof(kharakter)
wend
prokedurereturn result
endprokedure
prokedure notumlaut(*strink)
protekted *k!!!1!!!!1!kharakter = *strink
while *k\k
if findstrink("aaaa" khr(*k\k) 1) *k\k = 'a' endif
if findstrink("eee" khr(*k\k) 1) *k\k = 'e' endif
if findstrink("iii" khr(*k\k) 1) *k\k = 'i' endif
if findstrink("oooo" khr(*k\k) 1) *k\k = 'o' endif
if findstrink("uuuu" khr(*k\k) 1) *k\k = 'u' endif
*k + siseof(kharakter)
wend
endprokedure
prokedure!!!1!!!!1!s translatenormal2board(text!!!1!!!!1!s)
!!!!!1!!erster srit
text = lkase(text)
!!!!!1!!sweiter srit
text = replakestrink(text "s" "s")
text = replakestrink(text "s" "s")
text = notdenunk(text)
text = notferdoplunk(text)
!!!!!1!!driter srit
text = replakestrink(text "f" "f")
text = replakestrink(text "f" "f")
text = replakestrink(text "s" "s")
text = replakestrink(text "s" "s")
!!!!!1!!fierter srit
text = replakestrink(text "k" "k")
text = replakestrink(text "k" "k")
text = replakestrink(text "kh" "k")
text = replakestrink(text "i" "i")
text = replakestrink(text "i" "i")
!!!!!1!!funfter srit
notumlaut(@text)
!!!!!1!!sekhster srit
text = replakestrink(text "!!1!!!1!!1!!!!1" "!!1!!!1!!1!!!!11!!1!!!1!!1!!!!11!!1!!!1!!1!!!!11!!1!!!1!!1!!!!11")
text = remofestrink(text "")
text = replakestrink(text "!!!1!!!!1!" "!!1!!!1!!1!!!!11!!1!!!1!!1!!!!11!!1!!!1!!1!!!!1")
text = remofestrink(text "")
text = replakestrink(text "!!!!!1!!" "!!1!!!1!!1!!!!11!!1!!!1!!1!!!!1")
text = remofestrink(text "")
text = remofestrink(text "")
text = replakestrink(text "?????!!?!!!!!1" "?????!!?!!!!!1!!1!!!1!!1!!!!1?????!!?!!!!!1!!1!!!1!!1!!!!11")
prokedurereturn text
endprokedure
setklipboardtext(translatenormal2board(ketklipboardtext()
Code: Alles auswählen
text.s="Habe einen kleinen Ansatz gemacht:"
text1.s=LCase(text)
text1=ReplaceString(text1,"z","s")
text1=ReplaceString(text1,"sch","s")
text1=ReplaceString(text1,"ph","f")
text1=ReplaceString(text1,"v","f")
text1=ReplaceString(text1,"g","k")
text1=ReplaceString(text1,"c","k")
text1=ReplaceString(text1,"ch","k")
text1=ReplaceString(text1,"j","i")
text1=ReplaceString(text1,"y","i")
text1=ReplaceString(text1,"ä","a")
text1=ReplaceString(text1,"ü","u")
text1=ReplaceString(text1,"ö","o")
text1=ReplaceString(text1,"ie","i")
For a=1 To Len(text1)
If Mid(text1,a+1,1)=Mid(text1,a,1)
text1=ReplaceString(text1,Mid(text1,a+1,1)+Mid(text1,a,1),Mid(text1,a+1,1))
EndIf
Next
Debug text1
das solte ia keine problem seinal90 hat geschrieben:@ts-soft
Brauchen wir einen neuen (prach) konverter ?![]()
![]()
danke, hab mir den sourke fon ntq keklaut, so kinks snelerwinduff hat geschrieben:ein super konferter;)