stdlib: Add Lth_strdup_str
parent
c07856f6e8
commit
f8cc0672ba
|
@ -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
|
||||
|
|
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue