Notes
In Apex, the containsAny()
method is used to return true if the current String contains any of the characters in the specified String; otherwise, returns false.
Here's an example for true:
String s = 'hello';
Boolean b1 = s.containsAny('hx');
System.debug(b1);
Output: true
Here's an example for false:
String s = 'hello';
Boolean b2 = s.containsAny('x');
System.debug(b2);
Output: false
Video
Video does not exists.