(FEA) More macros for Status
This commit is contained in:
@@ -73,7 +73,7 @@ Status StringUtils_ToUnsignedComplexLongLongInteger(String *inst, unsigned _Comp
|
||||
Status StringUtils_ToAddress(String *inst, void **store);
|
||||
Status StringUtils_ToCharBuff(String *inst, char const *buff, int base);
|
||||
Status StringUtils_ToWideCharBuff(String *inst, wchar_t const *wbuff, int base);
|
||||
Status StringUtils_Format(String *inst, const String *__restrict fmt, ...);
|
||||
Status StringUtils_Format(String *inst, const String *restrict fmt, ...);
|
||||
Status StringUtils_Tokenise(String *inst, const String *delim, String *store);
|
||||
Status String_Encode(String *inst, StringEncoding encoding)
|
||||
throws(UnsupportedEncoding EncodingError DecodingError);
|
||||
|
@@ -5,32 +5,42 @@ Status String_Create(String *inst, int len)
|
||||
/* Create an array has length len + 1, for termination character in string. */
|
||||
ensure(Array_Create(inst, len + 1, sizeof(int)), "Failed to create a string.");
|
||||
|
||||
return NormalStatus;
|
||||
return apply(NormalStatus);
|
||||
}
|
||||
|
||||
Status String_CopyOf(String *inst, String *other)
|
||||
{
|
||||
fails(inst, UnavailableInstance);
|
||||
fails(inst, apply(UnavailableInstance));
|
||||
|
||||
return apply(NormalStatus);
|
||||
}
|
||||
|
||||
Status String_Delete(String *inst)
|
||||
{
|
||||
fails(inst, UnavailableInstance);
|
||||
fails(inst, apply(UnavailableInstance));
|
||||
|
||||
return apply(NormalStatus);
|
||||
}
|
||||
|
||||
Status String_GetAt(String *inst, Char *store, int index)
|
||||
{
|
||||
fails(inst, UnavailableInstance);
|
||||
fails(inst, apply(UnavailableInstance));
|
||||
|
||||
return apply(NormalStatus);
|
||||
}
|
||||
|
||||
Status String_SetAt(String *inst, Char *source, int index)
|
||||
{
|
||||
fails(inst, UnavailableInstance);
|
||||
fails(inst, apply(UnavailableInstance));
|
||||
|
||||
return apply(NormalStatus);
|
||||
}
|
||||
|
||||
Status String_Literalise(String *inst, String *store)
|
||||
{
|
||||
fails(inst, UnavailableInstance);
|
||||
fails(inst, apply(UnavailableInstance));
|
||||
|
||||
return apply(NormalStatus);
|
||||
}
|
||||
|
||||
int StringUtils_Compare(String *a, String *b)
|
||||
|
Reference in New Issue
Block a user