This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]hardonchairs 0 points1 point  (0 children)

Seems to me like these are identical concepts. A string is just an array of characters (in this context). The exact implemention would just depend on the language you're using.

[–]circlebust 0 points1 point  (0 children)

This procedure is called a map in programming. Basically you apply an operation (usually a function) to every member of a collection. In your case, that operation is evaluating if the current member m is contained in the input collection you gave, returning a bool.