SCREEN() function doesn't make nice with _FONT in graphic modes
#5
Good suggestion, perhaps I should add an advanced string library to QBJS.

In the meantime, you could use this little function to do a regular expression search:
Code: (Select All)
Dim s As String
s = "The quick brown fox jumps over the lazy dog. If the dog barked, was it really lazy?"

' Find any character that is not a word character or whitespace
Dim idx As Integer
idx = Search(s, "[^\w\s]")

' Expected output: 43
Print idx

Function Search (searchStr As String, regex As String)
$If Javascript Then
    Search = searchStr.search(regex);
$End If
End Function
Reply


Messages In This Thread
RE: SCREEN() function doesn't make nice with _FONT in graphic modes - by dbox - 05-24-2023, 12:14 PM



Users browsing this thread: 4 Guest(s)