86 wcstombs ( txt, wtxt,
sizeof(txt) );
169 while( txt[fin]!=
'\0')
177 finaltxt =
new char[pos+(fin-com+1)+1];
183 finaltxt[i] = text[i];
188 while( i<=fin && txt[i]!=
'\0')
190 finaltxt[pos+i-com] = txt[i];
193 finaltxt[pos+i-com] =
'\0';
215 while( txt[fin]!=
'\0')
223 finaltxt =
new char[pos+(fin-com+1)+1];
229 finaltxt[i] = text[i];
234 while( i<=fin && txt[i]!=
'\0')
236 finaltxt[pos+i-com] =(char)txt[i];
239 finaltxt[pos+i-com] =
'\0';
261 while( text[i1]!=
'\0' && txt[i2]!=
'\0')
263 if(text[i1] < txt[i2])
266 if(text[i1] > txt[i2])
275 if(text[i1] ==
'\0' && txt[i2] !=
'\0')
278 if(text[i1] !=
'\0' && txt[i2] ==
'\0')
310 while( cjto[j] !=
'\0')
312 if(text[i] == cjto[j])
326 while( cjto[j] !=
'\0')
328 if(text[i] == cjto[j])
354 txtcopy( txt.text, 0, 0, txt.length);
469 unsigned short *txtshort;
472 txtshort =
new unsigned short [length+1];
476 txtshort[i] =(char)text[i];
479 txtshort[length] =
'\0';
500 txtcopy( text, 0, com, com+cant-1);
537 if ( pos1 < pos2 ) newtxt.
txtcopy( text, 0, pos1, pos2-1);
554 }
else if ( text[pos1] ==
'\"') {
555 if ( (pos1+1) < length ) {
557 }
else pos2 = pos1+1;
566 if ( (pos1+1) < pos2 ) newtxt.
txtcopy( text, 0, pos1, pos2-1);
578 if ( (pos1+1) < pos2 ) newtxt.
txtcopy( text, 0, pos1, pos2-1);
620 for( i=0; i<length; i++)
621 if(text[i] >=
'a' && text[i] <=
'z')
622 text[i] = text[i] -(
'a'-
'A');
626 pos = interchar1.txtfind(tmp);
628 text[i] = interchar2[pos];
641 for( i=0; i<length; i++)
642 if(text[i] >=
'A' && text[i] <=
'Z')
643 text[i] = text[i] +(
'a'-
'A');
647 pos = interchar2.txtfind(tmp);
649 text[i] = interchar1[pos];
668 Ltext = Rtext.
Scan(separator);
670 while ( Ltext.
Length() > 0 ) {
675 Ltext = Rtext.
Scan(separator);
693 while( mRight.
Length()>0 ) {
699 for(j =0; j<(int)target.
Length(); j++ ) {
701 if ( target.text[j] == mRight.text[i+j] ) {
703 if ((j+1)==(int)target.
Length()) {
731 string str_src = (
char*) (*
this);
732 string str_search = (
char*) target;
733 string str_replace = (
char*) replacement;
737 for(
size_t pos = 0; ; pos += str_replace.length() )
739 pos = str_src.find( str_search, pos );
740 if( pos == string::npos )
break;
742 str_src.erase( pos, str_search.length() );
743 str_src.insert( pos, str_replace );
747 (*this) = str_src.c_str();
798 moText tt = (
char*)target;
799 moText tr = (
char*)replacement;
801 for(
int i=0; i<(int)
Length(); i++) {
804 text[i] = replacement[0];
1006 for(
int i=0; i<p_src.
Count(); i++ ) {
1020 if(array!=NULL)
delete[] array;
1035 if (array==NULL)
return ret;
1036 if(n>=1) {ret = array[n-1];}
1038 for(i=(n-1);i>0;i--) {
1039 array[i] = array[i-1];
1042 if (count>0) count--;
1049 if ( 0<=p_position && p_position<n ) {
1050 return array[p_position];
1057 if( p_position<n ) {
1058 array[p_position] = p_text;
1073 snprintf(buffer, 100,
"%i", a);
1083 snprintf(buffer, 100, pat, a);
1092 snprintf(buffer, 100,
"%i", a);
1101 snprintf(buffer, 100,
"%ld", a);
1110 snprintf(buffer, 100,
"%lu", a);
1119 snprintf(buffer, 100,
"%lld", a);
1128 snprintf(buffer, 100,
"%llu", a);
1137 snprintf(buffer, 100,
"%f", a);
1149 buffer =
new char[100];
1151 snprintf(buffer, n,
"%f", a);
1165 buffer =
new char[100];
1170 snprintf(buffer, 100,
"%02.3f", a);
1184 std::stringstream sr;
1185 sr << std::hex << hex;
1192 std::stringstream sr;
1193 sr << std::hex << hex;
int operator<(const moText0 &txt) const
moTextArray Explode(char *separator) const
moText0 & Insert(char *, MOuint)
LIBMOLDEO_API moText0 FloatToStr(double a)
float StrToFloat(const moText &str)
moText0 & operator=(const moText0 &txt)
int StrToInt(const moText &str)
void Replace(const moText0 &target, const moText0 &replacement)
moText0 & operator+=(const moText0 &txt)
moText0 & Delete(MOuint, MOuint)
void ReplaceChar(const char *target, const char *replacement)
clase de para manejar textos
void Set(int p_position, const moText &p_text)
double StrToDouble(const moText &str)
int HexToInt(const moText &hex)
moDefineDynamicArray(moTextArray) moText0
moText0 & Mid(MOuint, MOuint)
LIBMOLDEO_API moText0 operator+(const moText0 &txt1, const moText0 &txt2)
const moText & Get(int x) const
long StrToLong(const moText &str)
int operator==(const moText0 &txt) const
void Init(int max_heap=MO_MAX_DEBUG)
int operator!=(const moText0 &txt) const
long HexToLong(const moText &hex)
void Push(const moText &p_text)
moTextHeap & operator=(const moTextHeap &p_src)
int operator>=(const moText0 &txt) const
void txtcopy(const char *txt, MOuint pos=0, MOuint com=0, MOuint fin=MO_TXT_COMPLETE)
LIBMOLDEO_API moText0 IntToStr(int a)
int operator<=(const moText0 &txt) const
int operator>(const moText0 &txt) const
int Find(const moText0 &target)
divide el texto separado por el caracter especificado
moText0 & SubText(MOuint, MOuint)