Lastchars

From SA-MP Wiki

Jump to: navigation, search

lastchars

Image:Farm-Fresh text lowercase.png Note: This function name starts with a lowercase letter.


Description:

Extract the last characters from a string


Parameters:
(const source[], len)
const source[]The string from which to extract characters
lenThe number of how many characters to return


Return Values:

The last characters defined by len


Example Usage:

new string[MAX_STRING];
strins(string, lastchars("Only the last 5 characters will be SAVED", 5));
// string = "SAVED"


Related Functions

The following functions may be useful, as they are related to this function in one way or another.

  • firstchars: Extract the first characters from a string
  • left: Extract all characters from a string, which are left of a character
  • right: Extract all characters from a string, which are right of a character
  • strmid: Extract a range of characters from a string
Personal tools
Navigation
Toolbox