Minor formatting fixes.
This commit is contained in:
@@ -169,7 +169,7 @@ String time_to_string(uint8_t hours, uint8_t minutes)
|
|||||||
{
|
{
|
||||||
hours++;
|
hours++;
|
||||||
}
|
}
|
||||||
if (hours > 12) // 24h -> 12h, except 12h
|
if (hours > 12) // 24h -> 12h, except 12h
|
||||||
{
|
{
|
||||||
hours -= 12;
|
hours -= 12;
|
||||||
}
|
}
|
||||||
@@ -251,6 +251,7 @@ String split(String s, char parser, int index)
|
|||||||
String rs = "";
|
String rs = "";
|
||||||
int parser_cnt = 0;
|
int parser_cnt = 0;
|
||||||
int r_from_index = 0, r_to_index = -1;
|
int r_from_index = 0, r_to_index = -1;
|
||||||
|
|
||||||
while (index >= parser_cnt)
|
while (index >= parser_cnt)
|
||||||
{
|
{
|
||||||
r_from_index = r_to_index + 1;
|
r_from_index = r_to_index + 1;
|
||||||
@@ -264,7 +265,9 @@ String split(String s, char parser, int index)
|
|||||||
return s.substring(r_from_index, r_to_index);
|
return s.substring(r_from_index, r_to_index);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
parser_cnt++;
|
parser_cnt++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return rs;
|
return rs;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user