Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MaxMessageLength = MAXLENGTH_MESSAGE - strlen(name) - 5;
- LeftTrim(message, message, MaxMessageLength, 9);
- /**
- * Trims a string by removing the specified amount of chars from the beginning (including whitespace).
- * The Output String can be the same as the Input String.
- *
- * @param str Input String.
- * @param output Output String (Can be the as the input).
- * @param size Size of the output String.
- * @param chars Amount of characters to remove.
- * @noreturn
- */
- stock LeftTrim(const String:str[], String:output[], size, chars)
- {
- new x=0;
- while (str[x] != '\0' && x<chars)
- {
- x++;
- }
- x = strcopy(output, size, str[x]);
- x--;
- while (x >= 0 && x<chars)
- {
- x--;
- }
- output[++x] = '\0';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement