Skip to content

Commit

Permalink
Added contains() method - fix for issue mikechambers#162 on original …
Browse files Browse the repository at this point in the history
…fork
  • Loading branch information
sangupta committed Apr 30, 2012
1 parent d617d1e commit a8e22fa
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/com/adobe/utils/StringUtil.as
Original file line number Diff line number Diff line change
Expand Up @@ -264,5 +264,23 @@ package com.adobe.utils

return string;
}

/**
* Returns true if and only if the input string contains the specified sequence value.
*
* @param input The string in which we are searching for the sequence
* @param sequence The string to search for
*
* @returns true if input contains sequence, false otherwise
*
* @langversion ActionScript 3.0
* @playerversion Flash 9.0
* @tiptext
*/
public static function contains(input:String, sequence:String):Boolean
{
return input != null && input.indexOf(sequence) >= 0;
}

}
}

0 comments on commit a8e22fa

Please sign in to comment.