Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/String-case/Visual-Basic-.NET/string-case-2.vb
Normal file
18
Task/String-case/Visual-Basic-.NET/string-case-2.vb
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
:"ABCDEFGHIJKLMNOPQRSTUVWXYZ"→Str9
|
||||
:"abcdefghijklmnopqrstuvwxyz"→Str0
|
||||
:Input ">",Str1
|
||||
:":"+Str1+":"→Str1
|
||||
:Prompt U
|
||||
:If U:Then
|
||||
:For(I,2,length(Str1))
|
||||
:If inString(Str0,sub(Str1,I,1)) and sub(Str1,I,1)≠":"
|
||||
:sub(Str1,1,I-1)+sub(Str9,inString(Str0,sub(Str1,I,1)),1)+sub(Str1,I+1,length(Str1)-I)→Str1
|
||||
:End
|
||||
:Else
|
||||
:For(I,2,length(Str1))
|
||||
:If inString(Str9,sub(Str1,I,1)) and sub(Str1,I,1)≠":"
|
||||
:sub(Str1,1,I-1)+sub(Str0,inString(Str9,sub(Str1,I,1)),1)+sub(Str1,I+1,length(Str1)-I)→Str1
|
||||
:End
|
||||
:End
|
||||
:sub(Str1,2,length(Str1)-2)→Str1
|
||||
:Pause Str1
|
||||
Loading…
Add table
Add a link
Reference in a new issue