INSTR_RIGHT()

INSTR_RIGHT(S1,S2)

RETOURNE LA POSITION DANS S1 DU DERNIER CARACTÈRE DE S2 EN COMPTANT À PARTIR DE LA FIN, SI LA CHAINE S1 CONTIENT LA CHAINE S2

  • Type: Fonction
  • Paramètres: 2
  • Groupe: Chaines de caractères

ACTION

La fonction INSTR_RIGHT(S1,S2) retourne la position dans S1 du dernier caractère de S2, en commençant par la fin de S1, dans le cas où la chaîne S1 contient la chaîne S2,et la valeur 0 sinon.

SYNTAXE : Resultat=INSTR_RIGHT(S1,S2)

  • S1 = expression chaîne de caractères.
  • S2 = expression chaîne de caractères.

UTILISATION

  • La fonction INSTR_RIGHT() est utilisée pour rechercher la position d'une chaîne de caractères dans une autre, en commençant par la fin.

ERREUR

  • Si S1 n'est pas une expression string correcte.
  • Si S2 n'est pas une expression string correcte.

EXEMPLE

dim a$,b$

a$="panoramic"

b$="ram"

print instr_right(a$,b$)

print 3

EN RAPPORT

INSTR()

INSTR_LAST()

INSTR_POS()