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






Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New Strings
Author Message
xwerswoodx
Journeyman
*

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

UoMMO

Post: #1
New Strings
STRREPLACE: That means replace your word with word what you want
Code:
[Function strreplace] //<STRREPLACE WORD,NEW_WORD,SENTENCE>
LOCAL.VERI=<ARGV[0]>
LOCAL.NEW= <ARGV[1]>
ARGS=<explode " ",<f_commachange <f_commasep 2,<ARGS>>>>
FOR 0 <eval <ARGV>-1>
LOCAL.CNT=<ARGV[<dlocal._for>]>
LOCAL.STRREPLACE .= " "
    IF (STRMATCH(*<LOCAL.VERI>*, <LOCAL.CNT>))
        FOR X 0 <eval (strlen(<LOCAL.CNT>))-1>
            IF !(<DLOCAL.BLOCK>)
                IF (STRMATCH(<LOCAL.VERI>*, <STRSUB <DLOCAL.X> 0 <LOCAL.CNT>>))
                LOCAL.STRREPLACE .= "<LOCAL.NEW>"
                LOCAL.BLOCK <eval STRLEN(<LOCAL.VERI>)-1>
                ELSE
                LOCAL.STRREPLACE .= "<STRSUB 0 1 <STRSUB <DLOCAL.X> 0 <LOCAL.CNT>>>"
                ENDIF
            ELSE
            LOCAL.BLOCK -=1
            ENDIF
        ENDFOR
    ELSE
    LOCAL.STRREPLACE .= "<LOCAL.CNT>"
    ENDIF
ENDFOR
RETURN <explode "~",<strsub 2 0 <LOCAL.STRREPLACE>>>

Example: <strreplace Hamit,Mehmet,Hamitasd,asdHamit,asdHamitasd,Hamit,Hamit Mehmet Hamitasd>

STRREMOVE: Delete word from a sentence.
Code:
[Function strremove] // <STRREMOVE WORD,SENTENCE>
LOCAL.VERI=<ARGV[0]>
ARGS=<explode " ",<f_commachange <f_commasep 1,<ARGS>>>>
FOR 0 <eval <ARGV>-1>
LOCAL.CNT=<ARGV[<dlocal._for>]>
LOCAL.STRREMOVE .= " "
    IF (STRMATCH(*<LOCAL.VERI>*, <LOCAL.CNT>))
        FOR X 0 <eval (strlen(<LOCAL.CNT>))-1>
            IF !(<DLOCAL.BLOCK>)
                IF (STRMATCH(<LOCAL.VERI>*, <STRSUB <DLOCAL.X> 0 <LOCAL.CNT>>))
                LOCAL.BLOCK <eval STRLEN(<LOCAL.VERI>)-1>
                ELSE
                LOCAL.STRREMOVE .= "<STRSUB 0 1 <STRSUB <DLOCAL.X> 0 <LOCAL.CNT>>>"
                ENDIF
            ELSE
            LOCAL.BLOCK -=1
            ENDIF
        ENDFOR
    ELSE
    LOCAL.STRREMOVE .= "<LOCAL.CNT>"
    ENDIF
ENDFOR
RETURN <explode "~",<strsub 2 0 <LOCAL.STRREMOVE>>>

Example: <strremove Hamit,Hamitasd,asdHamit,asdHamitasd,Hamit,Hamit Mehmet Hamitasd>

NEEDED FUNCIONS:
Code:
[Function f_commasep] // <F_COMMASEP BAŞLANGIÇ,KELİME,KELİME,KELİME...>
LOCAL.START 1
IF (<dARGV[0]> >= 1) && (<dargv[0]> <= <eval <argv>-1>)
LOCAL.START <DARGV[0]>
ENDIF

FOR <dlocal.start> <eval <ARGV>-1>
LOCAL.RETURN .= ", <ARGV[<dlocal._for>]>"
ENDFOR
RETURN <streat <local.return>>

[Function f_commachange] // <F_COMMACHANGE BAŞLANGIÇ,KELİME,KELİME,KELİME...>
LOCAL.START 1
IF (<dARGV[0]> >= 1) && (<dargv[0]> <= <eval <argv>-1>)
LOCAL.START <DARGV[0]>
ENDIF

FOR <dlocal.start> <eval <ARGV>-1>
LOCAL.RETURN .= "~ <ARGV[<dlocal._for>]>"
ENDFOR
RETURN <streat <local.return>>
03-11-2013 06:53 AM
Find all posts by this user Like Post Quote this message in a reply
Staff_Stanic
Journeyman
*

Posts: 96
Likes Given: 25
Likes Received: 14 in 8 posts
Joined: Nov 2012
Reputation: 1

Dimension Shard

Post: #2
RE: New Strings
Hey! Good job!!
Thank you!
(This post was last modified: 08-08-2013 08:13 AM by Staff_Stanic.)
08-08-2013 08:12 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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