mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
19 lines
354 B
C++
19 lines
354 B
C++
//共通関数
|
|
|
|
#include "savefile.h"
|
|
|
|
//終端から前方検索で見つかった境界("/"=0x2f)位置を返す
|
|
//top :検索範囲の先頭指定
|
|
int GetPosDelmLast(wchar_t *s,int top)
|
|
{
|
|
size_t i = wcslen(s);
|
|
if (i < top)return -1;
|
|
if (i ==top)return 0;
|
|
i--;
|
|
while(i > top-1){
|
|
if (s[i]==L'/')return i;
|
|
i--;
|
|
}
|
|
return -1;
|
|
}
|