QualiWare supports all the functions and classes of Visual Basic e C# available on the .NET 4.7.2 platform.
All these APIs are available in every script input inside QualiWare. These functions are a fundamental part in programming Form Designer events and Server Daemon tasks.
NOTE: the functions explained here are written using the VB.NET syntax.
In order to make the programming work more confortable, QualiWare has a list of built-in functions.
at(ByVal s1 As String, ByVal s2 As String, Optional ByVal n As Integer = 1) As Integer
– returns the position of the first character of then
-th occurrence ofs1
ins2
. NOTE: the index system is 1-based.Array2String(ByVal a As DBArray, Optional ByVal separator As String = ",") As String
– returns a string made by concatenating the elements of the DBArray object specified as first argument, and by using theseparator
string specified as second argument.CheckIfItemInList(ByVal list As String, ByVal item As String, Optional ByVal separator As String = Chr(13)) As Boolean
– checks if theitem
string appears at least one time in thelist
string, using theseparator
string to distinguish the different list elements.ctod(ByVal dateValue As String As String) As Date
– transform the specified string into a date object, using the format of the current tongue.dtoc(ByVal dateValue As Date, Optional ByVal fmt As String = Nothing) As String
– transform the specified date into a string object, using the format of the current tongue or the one specified as second argument.Empty(ByVal expression As Object) As Boolean
– returnsTrue
if the specifies expression is “empty”. The “empty” value can be of different types:- String:
""
orNothing
- Number:
0
- Date: empty date
- Boolean:
False
- Object:
Nothing
- String:
File(ByVal path As String) As Boolean
– checks if the file corresponding to the specified path exists.Lower(ByVal str As String) As String
– transform the string into lowercase.max(ByVal a As Object, ByVal b As Object) As Object
– returns, between two values, the maximum one.min(ByVal a As Object, ByVal b As Object) As Object
– returns, between two values, the minimum one.rat(ByVal s1 As String, ByVal s2 As String, Optional ByVal n As Integer = 1) As Integer
– returns the position of the first character of then
-th occurrence ofs1
ins2
, starting from the last character ofs2
. NOTE: the index system is 1-based.replicate(ByVal str As String, ByVal n As Integer) As String
– returns a string made by repeating thestr
variablen
times.Str(ByVal num As Object, Optional ByVal nChars As Integer = 15, Optional ByVal ndec As Integer = 0) As String
– returns a string obtained by transformingnum
into a string ofnChars
characters with a number of decimals equal tondec
.String2Array(ByVal s As String, Optional ByVal separator As String = ",", Optional ByVal noRemoveEmpty As Boolean = True) As DBArray
– returns a DBArray object obtained by dividing thes
string on the basis of the specifiedseparator
string. If the third parameter isTrue
, it keeps any empty elements.Substring(ByVal s As String, ByVal start As Integer, Optional ByVal nChars As Integer = Integer.MaxValue) As String
– returns the substring ofs
obtained by starting from the character in thestart
position and including a number of characters equal tonChars
. NOTE: the index system is 1-based.Upper(ByVal str As String) As String
– transform the string into lowercase.