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-nmm7 (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-nmm7 (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-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cutting String in the right format
Author Message
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #1
Cutting String in the right format
Hi guys,

yesterday I tried to cut a string via some string function. at the end I got it but it is to large for my mind, I think so.
I used every string function.
Haven“t the script here but the strings are
s_circle_fire_1 or s_circle_fire_2 or ....s_circle_fire_10
I only need the string "circle_fire" at the end and I need it with one function
like f_cut_circle_word s_circle_1
first of all, I cut the s_ down and made a reverse


after that I cut the 1_,2_ .... 10_ down and reversed it back
so the code is very large Smile
Someone knows a lighter version?

Code:
LOCAL.LENGTH = <EVAL STRLEN(<ARGS>)>
LOCAL.NAME=<STRREVERSE <STRSUB 2 <dLOCAL.LENGTH>  <args>>>
LOCAL.LENGTH = <EVAL STRLEN(<LOCAL.NAME>)>
LOCAL.POS = <EVAL <STRPOS 0 _ <LOCAL.NAME>>+1>
LOCAL.NAME = <STRREVERSE <STRSUB <dLOCAL.POS> <dLOCAL.LENGHT> <LOCAL.NAME>>>
(This post was last modified: 10-02-2012 09:21 PM by admin phoenix.)
10-02-2012 05:08 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Cutting String in the right format - admin phoenix - 10-02-2012 05:08 PM

Forum Jump:


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