Skip to content

Commit

Permalink
card
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuwandy committed Dec 14, 2017
1 parent 170d371 commit fd39a80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WeatherBot/Weather.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public static string GetCurrentTemperature(string cityName)

public static string GetCity(string text)
{
int idx = text.IndexOf("for");
int idx = text.IndexOf("for ");
int len = 4;
if (idx == 0)
if (idx == -1)
{
idx = text.IndexOf("in");
idx = text.IndexOf("in ");
if (idx > 0)
{
len = 3;
Expand Down

0 comments on commit fd39a80

Please sign in to comment.