View Single Post
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