Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Util/StringAND test
Function:
Required plugins for this example: MBS Main Plugin, MBS Util Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/StringAND test
This example is the version from Sun, 17th Mar 2012.
Project "StringAND test.rbp"
FileTypes
Filetype text
End FileTypes
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
EventHandler Sub Open() dim s as String dim i as integer dim c,cc as String const t="Hallo LEUTE" // an easy way to make letters capital // A=65, a=97, so the difference is 32 and we remove this bit. // Does not work for non letters (e.g. numbers) cc=chr(255-32) c=cc // for 8bit only // This is for the fast 32bit mode test: 'for i=1 to lenb(t) 'c=c+cc 'next s=Fix(StringANDMBS(t,c)) // should not be needed: 'SetEncodingOfString s,0 me.text=s End EventHandler
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End Control
Control StaticText4 Inherits Label
ControlInstance StaticText4 Inherits Label
End Control
Control StaticText5 Inherits Label
ControlInstance StaticText5 Inherits Label
EventHandler Sub Open() dim s as String dim i as integer dim c,cc as String const t="Hallo LEUTE" // an easy way to make letters capital // A=65, a=97, so the difference is 32 and we add this bit. // Does not work for non letters (e.g. numbers) cc=chr(32) c=cc // for 8bit only // This is for the fast 32bit mode test: 'for i=1 to lenb(t) 'c=c+cc 'next s=Fix(StringORMBS(t,c)) // should not be needed: 'SetEncodingOfString s,0 me.text=s End EventHandler
End Control
Control StaticText6 Inherits Label
ControlInstance StaticText6 Inherits Label
End Control
Control StaticText7 Inherits Label
ControlInstance StaticText7 Inherits Label
EventHandler Sub Open() dim s as String dim i as integer dim c,cc as String const t="Hallo LEUTE" // an easy way to make letters capital // A=65, a=97, so the difference is 32 and we add or remove this bit. // Does not work for non letters (e.g. numbers) cc=chr(32) c=cc // for 8bit only // This is for the fast 32bit mode test: 'for i=1 to lenb(t) 'c=c+cc 'next s=Fix(StringXORMBS(t,c)) // should not be needed: 'SetEncodingOfString s,0 me.text=s End EventHandler
End Control
Control StaticText8 Inherits Label
ControlInstance StaticText8 Inherits Label
End Control
Control StaticText9 Inherits Label
ControlInstance StaticText9 Inherits Label
EventHandler Sub Open() me.text=MBSPluginVersion End EventHandler
End Control
Protected Function Fix(s as string) As string dim i,c as integer dim t as string dim z as string // replace unprintable characters with spaces c=len(s) for i=1 to c z=mid(s,i,1) if asc(z)<32 then z=" " end if t=t+z next Return t End Function
End Class
MenuBar MenuBar1
MenuItem UntitledMenu1 = ""
MenuItem FileMenu = "&File"
MenuItem FileQuit = "Quit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu0 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Util Plugin.




Links
MBS Xojo PDF Plugins