Monday, April 18, 2016

What do you mean by prefix and suffix?

Prefix and Suffix : A prefix of a string is any number of leading symbols of that string, and suffix is any number of trailing symbols.

Example : String abc has prefixes E,c,bc and abc, its suffixes are E, c, bc, and abc. 

A prefix or suffix of a string other than the string itself is called a proper prefix or suffix.