diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index 9acd711b..7ba04509 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -197,6 +197,27 @@ namespace WebSocketSharp : stream.ToByteArray (); } + /// + /// Determines whether the specified contains any of characters in + /// the specified array of . + /// + /// + /// true if contains any of ; + /// otherwise, false. + /// + /// + /// A to test. + /// + /// + /// An array of that contains characters to find. + /// + internal static bool Contains (this string value, params char[] anyOf) + { + return anyOf != null && anyOf.Length > 0 + ? value.IndexOfAny (anyOf) > -1 + : false; + } + internal static bool Contains ( this NameValueCollection collection, string name ) @@ -1165,29 +1186,6 @@ namespace WebSocketSharp #region Public Methods - /// - /// Determines whether the specified contains any of characters in - /// the specified array of . - /// - /// - /// true if contains any of ; - /// otherwise, false. - /// - /// - /// A to test. - /// - /// - /// An array of that contains characters to find. - /// - public static bool Contains (this string value, params char[] chars) - { - return chars == null || chars.Length == 0 - ? true - : value == null || value.Length == 0 - ? false - : value.IndexOfAny (chars) > -1; - } - /// /// Emits the specified delegate if it isn't . ///