Subversion Repositories spk

Rev

Rev 227 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 227 Rev 295
Line 91... Line 91...
91
 
91
 
92
			bool found = true;
92
			bool found = true;
93
			int pos = 0;
93
			int pos = 0;
94
			while (found)
94
			while (found)
95
			{
95
			{
96
				pos = t->IndexOf('{', pos);
96
				pos = t->IndexOf(L'{', pos);
97
				found = false;
97
				found = false;
98
				if ( pos > -1 )
98
				if ( pos > -1 )
99
				{
99
				{
100
					int page = -1;
100
					int page = -1;
101
					int id = -1;
101
					int id = -1;
102
 
102
 
103
					int commaPos = t->IndexOf(',', pos);
103
					int commaPos = t->IndexOf(L',', pos);
104
					if ( commaPos > -1 )
104
					if ( commaPos > -1 )
105
					{
105
					{
106
						page = Convert::ToInt32(t->Substring(pos + 1, commaPos - (pos + 1)));
106
						page = Convert::ToInt32(t->Substring(pos + 1, commaPos - (pos + 1)));
107
						int endPos = t->IndexOf('}', commaPos);
107
						int endPos = t->IndexOf(L'}', commaPos);
108
						if ( endPos > -1 )
108
						if ( endPos > -1 )
109
						{
109
						{
110
							id = Convert::ToInt32(t->Substring(commaPos + 1, endPos - (commaPos + 1)));
110
							id = Convert::ToInt32(t->Substring(commaPos + 1, endPos - (commaPos + 1)));
111
							found = true;
111
							found = true;
112
							t = t->Replace(t->Substring(pos, endPos - pos + 1 ), this->FindText(game, page, id));
112
							t = t->Replace(t->Substring(pos, endPos - pos + 1 ), this->FindText(game, page, id));