Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Function Pointers? BlameTroi 5 238 02-20-2026, 05:55 PM
Last Post: BlameTroi
  Make windows .exe using Linux version? Circlotron 7 515 01-15-2026, 09:42 PM
Last Post: ahenry3068
  Just in case anyone doesn't fully appreciate this forum... Pete 8 871 09-06-2025, 06:37 PM
Last Post: SMcNeill
  Underscore doesn't show Circlotron 2 665 01-24-2024, 12:35 PM
Last Post: SMcNeill
  function "_ARCSEC()" is wrong? BSpinoza 16 3,438 10-31-2023, 04:23 PM
Last Post: SMcNeill

Forum Jump:


Users browsing this thread: 1 Guest(s)