Findrchar

From Mesham
Revision as of 10:21, 15 April 2013 by Polas (talk | contribs) (Created page with '== Overview == This findrchar(s, c) function will return the index of the last occurrence of character ''c'' in string ''s''. * '''Pass:''' A String and Char * '''Retur…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Overview

This findrchar(s, c) function will return the index of the last occurrence of character c in string s.

  • Pass: A String and Char
  • Returns: An Int
  • Throws: The error string notfound if the character does not exist within the string

Example

#include <string>
var a:="hello";
var c:=findrchar(a,'l');

Since: Version 1.0