#PB_String_InPlace for LCase and UCase
It would be useful to be able to LCase or UCase larger strings in place the same way that ReplaceString can.
FindString in a buffer
It would be useful to be able to supply a pointer argument to FindString's String$ parameter.
TCase or ICase
A New Function To Initial Capitalise A String
Thank you for consideration.
Some additional string library functions
Re: Some additional string library functions
Sorry, wrong thread...
Last edited by jacdelad on Wed Feb 25, 2026 9:36 am, edited 1 time in total.
Good morning, that's a nice tnetennba!
PureBasic 6.30/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/2*DX517, 164TB+82TB+28TB+2TB SSD
Raspi 400/500
PureBasic 6.30/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/2*DX517, 164TB+82TB+28TB+2TB SSD
Raspi 400/500
Re: Some additional string library functions
In version PB v6.40 Alpha there will be no string inplace. Has also been removed in ReplaceString.
My Projects EventDesigner V3 / ThreadToGUI / OOP-BaseClass / Windows: Module ActiveScript
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
Re: Some additional string library functions
Yes, that reminds me of something...
Extension of StringField() ... New Parameter => Mode
New Funtions based on StringField() for Integer results ...
Extension of FindString() ... New Constants for Mode
Then I could finally retire my self-made faulty functions.
Extension of StringField() ... New Parameter => Mode
Code: Select all
Result$ = StringField(String$, Index, Delimiter$, Mode=#PB_StringField_None)
;
; All (new) Mode Constants
;
; #PB_StringField_None ; default, act like the old Version
; #PB_StringField_NoCase ; ... if Delimiter$ something like "Text" (A=a)
; #PB_StringField_CSV ; eg. String$ = "Text", 128, "A Text Line ", 0 => returns "Text" or "128" or "A Test Line "
; #PB_StringField_Trim ; eg. String$ = Field 1 | Field 2 | => returns "Field 1" or "Field 2"
;
; #PB_StringField_SkipSQuote ; eg. String$ = 'Text', 'A "Text" Line, cool ', => returns "Text" or "A "Test" Line, cool "
; #PB_StringField_SkipDQuote ; eg. String$ = "Text", "A Text Line, cool ", => returns "Text" or "A Test Line, cool "
Code: Select all
Result = StringFieldInteger(String$, Index, Delimiter$, DefaultValue)
Result = StringFieldRangeInteger(String$, Index, Delimiter$, DefaultValue, MinValue, MaxValue)
Code: Select all
Position = FindString(String$, StringToFind$ [, StartPosition [, Mode]])
;
; Old Mode (existing)
; #PB_String_CaseSensitive .. case sensitive search (a=a) (default).
; #PB_String_NoCase .. Case insensitive search (A=a).
;
; New Mode (extended)
; #PB_String_SkipSQuotes .. skip single quotation marks
; #PB_String_SkipDQuotes .. skip double quotation marks
;
; Example
; String$ => Procedure TraceOut(ErrCode, Message$="; No Error") ; VOID .. displays the message in Trace-Monitor
;
result = FindString(String$, ";", 1, #PB_String_SkipDQuotes)
; result = 53
Then I could finally retire my self-made faulty functions.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Re: Some additional string library functions
There is the utf16 module with 2 variants
it does Ucase Lcase and Titlecase inplace
https://github.com/idle-PB/UTF16/blob/main/UTF16.pb
it does Ucase Lcase and Titlecase inplace
https://github.com/idle-PB/UTF16/blob/main/UTF16.pb
Re: Some additional string library functions
I haven't downloaded that yet to be honest. In which case, it's a request to have it re-instated too then!mk-soft wrote: Wed Feb 25, 2026 9:27 am In version PB v6.40 Alpha there will be no string inplace. Has also been removed in ReplaceString.
Useful to know, thanks!idle wrote: Wed Feb 25, 2026 9:13 pm There is the utf16 module ... t does Ucase Lcase and Titlecase inplace
Re: Some additional string library functions
They are large 5000 and 11000 loc for accent stripping version but it means you can support full unicode with simple or full casefolding string compares. And do left right mid on utf16 encoded strings.spikey wrote: Wed Feb 25, 2026 9:17 pmI haven't downloaded that yet to be honest. In which case, it's a request to have it re-instated too then!mk-soft wrote: Wed Feb 25, 2026 9:27 am In version PB v6.40 Alpha there will be no string inplace. Has also been removed in ReplaceString.Useful to know, thanks!idle wrote: Wed Feb 25, 2026 9:13 pm There is the utf16 module ... t does Ucase Lcase and Titlecase inplace

