In the beginning I was not the best.
And the world was also not the best.
But I still know that I am who I am.
Because I think that it is good.
I have been working hard.
I have been keeping growth with the world.
And it was so.
In the beginning I was not the best.
And the world was also not the best.
But I still know that I am who I am.
Because I think that it is good.
I have been working hard.
I have been keeping growth with the world.
And it was so.
int wsinstrrev(const WCHR* szTar, const WCHR* szCmp, int st)
{
int i;
for (i = wcslen(szTar) - wcslen(szCmp) + 1; i >= st; i--)
if (!wcscmp(szCmp, wsmid(szTar, i, wcslen(szCmp))))
return i;
return -1;
}
复制代码
In the beginning I was not the best.
And the world was also not the best.
But I still know that I am who I am.
Because I think that it is good.
I have been working hard.
I have been keeping growth with the world.
And it was so.
In the beginning I was not the best.
And the world was also not the best.
But I still know that I am who I am.
Because I think that it is good.
I have been working hard.
I have been keeping growth with the world.
And it was so.
for (i = 0, j = k - 1; i < wcslen(szTar); i++, j--)
{
rtn[j] = szTar[i];
}
rtn[i] = '\0';
wcscpy(szTar, rtn);
}
WCHR* wsright(const WCHR* szTar, int n)
{
int i, j, l;
WCHR* rtn;
WCHR tmpWChr[2] = {'\0', '\0'};
l = wcslen(szTar);
if (n > l)
return L"";
rtn = (WCHR*)malloc(sizeof(szTar));
wcscpy(rtn, L"");
for (i = l - 1, j = 1; j <= n; i--, j++)
{
tmpWChr[0] = szTar[i];
wcscat(rtn, tmpWChr);
}
wsinverse(rtn);
return rtn;
}
WCHR* wsmid(const WCHR* szTar, int st, int n)
{
int i;
WCHR* rtn;
WCHR tmpWChr[2] = {'\0', '\0'};
if ((st - 1 + n) > wcslen(szTar))
return L"";
rtn = (WCHR*)malloc(sizeof(szTar));
wcscpy(rtn, L"");
for (i = st - 1; i <= st + n - 2; i++)
{
tmpWChr[0] = szTar[i];
wcscat(rtn, tmpWChr);
}
return rtn;
}
int wsinstr(const WCHR* szTar, const WCHR* szCmp, int st)
{
int i;
if (st >= wcslen(szTar) - wcslen(szCmp))
return -1;
for (i = st; i <= wcslen(szTar); i++)
{
if (!wcscmp(szCmp, wsmid(szTar, i, wcslen(szCmp))))
return i;
}
return -1;
}
void wsltrim(WCHR* szTar)
{
int i;
int b = 0;
WCHR* rtn;
WCHR tmpWChr[2] = {'\0', '\0'};
rtn = (WCHR*)malloc(sizeof(szTar));
wcscpy(rtn, L"");
for (i = 0; i < wcslen(szTar); i++)
{
tmpWChr[0] = szTar[i];
if (tmpWChr[0] != ' ' || b != 0)
{
wcscat(rtn, tmpWChr);
if (tmpWChr[0] != ' ' && b == 0)
b = !(b);
}
}
wcscpy(szTar, rtn);
}
void wsrtrim(WCHR* szTar)
{
int i, j, l;
int b = 0;
WCHR* rtn;
WCHR tmpWChr[2] = {'\0', '\0'};
l = wcslen(szTar);
rtn = (WCHR*)malloc(sizeof(szTar));
wcscpy(rtn, L"");
for (i = l - 1, j = 1; j < l; i--, j++)
{
tmpWChr[0] = szTar[i];
if (tmpWChr[0] != ' ' || b != 0)
{
wcscat(rtn, tmpWChr);
if (tmpWChr[0] != ' ' && b == 0)
b = !(b);
}
}
wsinverse(rtn);
wcscpy(szTar, rtn);
}
int wsinstrrev(const WCHR* szTar, const WCHR* szCmp, int st)
{
int i;
for (i = wcslen(szTar) - wcslen(szCmp) + 1; i >= st; i--)
if (!wcscmp(szCmp, wsmid(szTar, i, wcslen(szCmp))))
return i;
return -1;
}
//End String Functions
复制代码
In the beginning I was not the best.
And the world was also not the best.
But I still know that I am who I am.
Because I think that it is good.
I have been working hard.
I have been keeping growth with the world.
And it was so.
In the beginning I was not the best.
And the world was also not the best.
But I still know that I am who I am.
Because I think that it is good.
I have been working hard.
I have been keeping growth with the world.
And it was so.
int wsinstrrev(const WCHR* szTar, const WCHR* szCmp, int st)
{
int i;
for (i = wcslen(szTar) - wcslen(szCmp) + 1; i >= st; i--)
if (!wcscmp(szCmp, wsmid(szTar, i, wcslen(szCmp))))
return i;
return -1;
}
//End String Functions
复制代码
In the beginning I was not the best.
And the world was also not the best.
But I still know that I am who I am.
Because I think that it is good.
I have been working hard.
I have been keeping growth with the world.
And it was so.