33 ID::ID(
const QString &name,
int basenum) {
36 if(!p_namebase.contains(
"?")) {
37 QString msg =
"No replacement set in string [" + p_namebase +
"]";
40 p_numStart = ((int) p_namebase.indexOf(
"?", 0));
41 int endPos = (int)p_namebase.lastIndexOf(
"?");
42 p_numLength = (endPos - p_numStart) + 1;
43 QString sub = p_namebase.mid(p_numStart, p_numLength);
44 for(
int i = 0; i < (int)sub.length(); i++) {
46 QString msg =
"IString [" + p_namebase +
"] contains more than one replacement set";
50 p_namebase.remove(p_numStart, p_numLength);
66 if((
int)num.size() > p_numLength) {
67 QString replacement =
"?";
68 while((
int)replacement.size() < p_numLength) {
71 QString original = p_namebase;
72 original.insert(p_numStart, replacement);
73 QString msg =
"Maximum number reached for string [" + original +
"]";
76 while((
int)num.size() < p_numLength) {
80 QString temp = p_namebase;
81 return temp.insert((p_numStart), num.c_str());
Namespace for the standard library.
#define _FILEINFO_
Macro for the filename and line number.
Adds specific functionality to C++ strings.
Namespace for ISIS/Bullet specific routines.