Link to home
Start Free TrialLog in
Avatar of naisnet
naisnetFlag for United States of America

asked on

Return the Percentage of Characters in String A that occur in string B

I'm looking to create a function that returns the percentage of characters in string [A] that occur in string |B|.  

Example

String |A| = 'bookmarked'
String |B| = 'bookstands'

Using string |A| as the base, 50% of the characters in string |A| occur in string |B| (b,o,o,k,a).  The percentage should be returned from the function as an integer.  

Thanks, Gurus.  
ASKER CERTIFIED SOLUTION
Avatar of JestersGrind
JestersGrind
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of naisnet

ASKER

Excellent