Raised This Month: $ Target: $400
 0% 

String Manipulation Functions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
milutinke
AlliedModders Donor
Join Date: Jun 2012
Location: Serbia
Old 04-08-2020 , 12:44   Re: String Manipulation Functions
Reply With Quote #3

Added copyc and improved StringToUpperCase and StringToLowerCase

PHP Code:
/**
 * Copies the input string into the output string until it reaches the given character
 * 
 * @param szInput           Input string
 * @param szOutput          Output string
 * @param iOutputLength     Output max length
 * @param cCharacter        Character
 * 
 * @return                  void
*/
stock void CopyC(const char[] szInputchar[] szOutputint iOutputLengthchar cCharacter) {
    
int iInputIteratoriOutputIterator;
    
    while(
szInput[iInputIterator] != EOS && iOutputIterator iOutputLength && szInput[iInputIterator] != cCharacter)
        
szOutput[iOutputIterator ++] = szInput[iInputIterator ++];
    
    
szOutput[iOutputIterator] = EOS;


Last edited by milutinke; 04-10-2020 at 19:10.
milutinke is offline
Send a message via Skype™ to milutinke
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode