This is my code:
if (resp == "AxlRose")
{
Report.Success("User found");
}
else
{
Report.Failure("User not found");
}
The response usually looks like this: "AxlRose13123213" where the number always changes and is random, how can I include a wildcard in my request?
To ignore any trailing characters, you could use the StartsWith
method of the String object:
if (resp.StartsWith("AxlRose"))
{
Report.Success("User found");
}
else
{
Report.Failure("User not found");
}
Note that I won't look at how correct this is in terms of proper user authentication (not), just addressing the question strictly technically.