1
0
Fork 0

stdlib: Add Lth_strdup_str

master
Marrub 2016-10-18 13:44:22 -04:00
parent c07856f6e8
commit f8cc0672ba
2 changed files with 15 additions and 0 deletions

View File

@ -19,6 +19,7 @@
//
char *Lth_strdup(char const *s);
__str Lth_strdup_str(char const *s);
void Lth_PrintString(char const *s);
#endif//lithos3__Lth_stdlib_h

View File

@ -35,6 +35,20 @@ char *Lth_strdup(char const *s)
return ret;
}
//
// Lth_strdup_str
//
// Duplicates a string into a new string entity.
//
__str Lth_strdup_str(char const *s)
{
Lth_assert(s != NULL);
size_t len = strlen(s);
ACS_BeginPrint();
Lth_PrintString(s);
return ACS_EndStrParam();
}
//
// Lth_PrintString
//