The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOURCE] STRTOKEN
Author Message
xwerswoodx
Journeyman
*

Posts: 86
Likes Given: 4
Likes Received: 7 in 4 posts
Joined: Jun 2012
Reputation: 0

UoMMO

Post: #3
RE: [SOURCE] STRTOKEN
Sorry for late answer I saw your message now, basically, it lets you to seperate sentences with commas.

For example:
If you have string "1,000 2,000 3,000" and you want to get 2,000 you can use <STRTOKEN "1,000 2,000 3,000",2," ">.

For example if you have in-game forum like me, you can censor swearing words with strtoken but explode overrides commas so it's not possible if sentence has commas or if there are 6-7 commas you can use for/while to check everystring inside commas to do it.

Code:
[FUNCTION DIFF]
SERV.LOG ARGS: <ARGV[2]>
SERV.LOG STRTOKEN: <STRTOKEN "<ARGS>",3," ">
ARGS=<EXPLODE " ",<ARGS>>
SERV.LOG EXPLODE: <ARGV[2]>

23:40:'xwerswoodx' commands 'diff 1,000 2,000 5,000 100,000 9,000'=1
23:40:(insurance.scp,2)ARGS: 000 5
23:40:(insurance.scp,3)STRTOKEN: 5,000
23:40:(insurance.scp,5)EXPLODE: 2
(This post was last modified: 06-02-2017 08:17 AM by xwerswoodx.)
06-01-2017 03:07 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
[SOURCE] STRTOKEN - xwerswoodx - 02-16-2017, 03:15 AM
RE: [SOURCE] STRTOKEN - rastrero - 03-04-2017, 05:08 AM
RE: [SOURCE] STRTOKEN - xwerswoodx - 06-01-2017 03:07 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)