substring method

This commit is contained in:
2026-04-27 18:53:25 -04:00
parent 37967b9f94
commit e8dc131f3c
8 changed files with 9 additions and 1 deletions

View File

@ -653,6 +653,13 @@ namespace ams
return;
}
amsstring amsstring::substring(const int ind1, const int ind2) const
{
amsstring ret;
this->substring(ind1,ind2,&ret);
return ret;
}
void amsstring::append(const amsstring &other)
{

View File

@ -140,7 +140,7 @@ int amssprintf_s(char *s, int n, const char *format, ...)
//va_arg(val,datatype)
// if(s!=NULL)
// {
#if defined(LINUX) || defined(linux) || defined(__linux__) || defined(__GNUC__)
#if defined(LINUX) || defined(linux) || defined(__linux__) || defined(__GNUC__) || defined(__APPLE__) || defined(__MACH__)
//use snprintf
ret = (int)vsnprintf(s,n,format,args);
s[n-1] = '\0';