/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/** *Compareunicharstringptrs,stoppingatthe1stnull *NOTE:Ifbotharenull,wereturn0. *NOTE:Weterminatethesearchuponencounteringanullptr * *@updategess11/10/99 *@params1ands2bothpointtounicharstrings *@return0iftheymatch,-1ifs1<s2;1ifs1>s2
*/
int32_t nsCRT::strcmp(const char16_t* aStr1, const char16_t* aStr2) { if (aStr1 && aStr2) { for (;;) {
char16_t c1 = *aStr1++;
char16_t c2 = *aStr2++; if (c1 != c2) { if (c1 < c2) { return -1;
} return1;
} if (c1 == 0 || c2 == 0) { break;
}
}
} else { if (aStr1) { // aStr2 must have been null return -1;
} if (aStr2) { // aStr1 must have been null return1;
}
} return0;
}
// This should use NSPR but NSPR isn't exporting its PR_strtoll function // Until then...
int64_t nsCRT::atoll(constchar* aStr) { if (!aStr) { return0;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.