[Modify] Polish it

This commit is contained in:
sta 2018-02-02 16:39:21 +09:00
parent 46731fc93b
commit 38aa2fbe8e

View File

@ -464,10 +464,7 @@ namespace WebSocketSharp
/// </param> /// </param>
internal static string GetValue (this string nameAndValue, char separator) internal static string GetValue (this string nameAndValue, char separator)
{ {
var idx = nameAndValue.IndexOf (separator); return nameAndValue.GetValue (separator, false);
return idx > -1 && idx < nameAndValue.Length - 1
? nameAndValue.Substring (idx + 1).Trim ()
: null;
} }
internal static string GetValue ( internal static string GetValue (