Skip to content

Commit a8e22fa

Browse files
committed
Added contains() method - fix for issue mikechambers#162 on original fork
1 parent d617d1e commit a8e22fa

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Diff for: src/com/adobe/utils/StringUtil.as

+18
Original file line numberDiff line numberDiff line change
@@ -264,5 +264,23 @@ package com.adobe.utils
264264

265265
return string;
266266
}
267+
268+
/**
269+
* Returns true if and only if the input string contains the specified sequence value.
270+
*
271+
* @param input The string in which we are searching for the sequence
272+
* @param sequence The string to search for
273+
*
274+
* @returns true if input contains sequence, false otherwise
275+
*
276+
* @langversion ActionScript 3.0
277+
* @playerversion Flash 9.0
278+
* @tiptext
279+
*/
280+
public static function contains(input:String, sequence:String):Boolean
281+
{
282+
return input != null && input.indexOf(sequence) >= 0;
283+
}
284+
267285
}
268286
}

0 commit comments

Comments
 (0)