Difference between revisions of "Talk:LlReplaceSubString"

From Second Life Wiki
Jump to navigation Jump to search
m (→‎About time!: commenting!)
 
Line 17: Line 17:


: {{Mention|Peter Stindberg|p=,}} I had no idea this took 20 years to be implemented! I just learned his week that it existed, by 'naturally' using it — I cannot even remember what we used before this! — [[User:Gwyneth Llewelyn|Gwyneth Llewelyn]] ([[User talk:Gwyneth Llewelyn|talk]]) 14:41, 5 January 2025 (PST)
: {{Mention|Peter Stindberg|p=,}} I had no idea this took 20 years to be implemented! I just learned his week that it existed, by 'naturally' using it — I cannot even remember what we used before this! — [[User:Gwyneth Llewelyn|Gwyneth Llewelyn]] ([[User talk:Gwyneth Llewelyn|talk]]) 14:41, 5 January 2025 (PST)
:: You still find code galore - even on this wiki - that uses user-defined functions for this. I have changed a few occurances, but there are certainly more. The Linden Lab implementation goes nicely beyond the most popular udf by providing the count variable, which is VERY useful!
:: — [[User:Peter Stindberg|Peter Stindberg]] ([[User talk:Peter Stindberg|talk]]) 23:01, 5 January 2025 (PST)

Latest revision as of 23:01, 5 January 2025

About time!

It's not rolled out fully yet. You can start using it in your code already now though, using Firestom's conditional compiles:

#define no577942

#ifdef no577942
string llReplaceSubString(string str, string search, string replace, integer count) {
    return llDumpList2String(llParseStringKeepNulls((str = "") + str, [search], []), replace);
}
#endif

Once it's rolled out in your region, simply remove the #define statement.

Peter Stindberg (talk) 08:31, 01 February 2023 (PDT)

@Peter Stindberg, I had no idea this took 20 years to be implemented! I just learned his week that it existed, by 'naturally' using it — I cannot even remember what we used before this! — Gwyneth Llewelyn (talk) 14:41, 5 January 2025 (PST)
You still find code galore - even on this wiki - that uses user-defined functions for this. I have changed a few occurances, but there are certainly more. The Linden Lab implementation goes nicely beyond the most popular udf by providing the count variable, which is VERY useful!
Peter Stindberg (talk) 23:01, 5 January 2025 (PST)