From SA-MP Wiki

Jump to: navigation, search


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


Extract all characters from a string, which are right from a position

(const source[], pos)
const source[]The string from which to extract characters
posThe position to get all characters right from (first character is 0)

Return Values:

The right part of the string (without the character at pos)

Example Usage:

new string[MAX_STRING];
format(string,sizeof(string), right("Only the second sentence.Second sentence", 24)); // string = "Second sentence"
format(string,sizeof(string), right("time is 12:45", strfind("time is 12:45",":"))); // string = "45"

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
  • lastchars: Extract the last characters from a string
  • left: Extract all characters from a string, which are left from a position
  • strmid: Extract a range of characters from a string
Personal tools