Use existing getStringAtIndex as considers length

This commit is contained in:
Peter Feerick
2022-03-21 11:48:51 +01:00
committed by Raphael Coeffic
parent 21f776d40c
commit 19b1db7275
3 changed files with 2 additions and 9 deletions
-7
View File
@@ -158,13 +158,6 @@ char *getStringAtIndex(char *dest, const char *s, int idx)
return dest;
}
const char *getStringAtIndex(const char *s, int idx)
{
uint8_t len = s[0];
return s + 1 + len * idx;
}
char *strAppendStringWithIndex(char *dest, const char *s, int idx)
{
return strAppendUnsigned(strAppend(dest, s), abs(idx));