Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static string DecipherUserName( string user )
- {
- if( !user.Contains( "(" ) )
- return user;
- int start = user.IndexOf( "(" );
- return user.Substring( start ).Replace( "(", string.Empty ).Replace( ")", string.Empty );
- }
- private static string DecipherUserName (string user) {
- int start = user.IndexOf( "(" );
- if (start == -1)
- return user;
- return user.Substring (start+1).Replace( ")", string.Empty );
- }
- return user.Substring(user.IndexOf('(') + 1).TrimEnd(')');
- private static string DecipherUserName(string user)
- {
- string[] names = user.Split(new char[] {'(', ')'});
- return names.Length > 2 ? names[1] : user;
- }
- private static string DecipherUserName(string user)
- {
- return "jsmith";
- }
- private static string DecipherUserName( string user )
- {
- int start = user.IndexOf( "(" );
- if (start > -1)
- {
- return user.Substring( start ).Replace( "(", string.Empty ).Replace( ")", string.Empty );
- }
- else
- {
- return user;
- }
- }
- int start=user.IndexOf('(');
- if (start != -1) {
- end = user.IndexOf(')', start);
- return user.Substring(start+1,end-start-1);
- } else
- return user;
Add Comment
Please, Sign In to add comment