관리 된 C ++ 구문을 찾고 교체합니다
-
18-09-2019 - |
문제
접두사로 URL 요청을 가져 오는 ISAPI 필터를 구축하고 있습니다. "http : // localhost/"그리고 해당 URL 요청을 내 메시지 페이지로 리디렉션합니다"http : //localhost/default.html."
해결책은 다음과 같습니다.
if (urlstring.find ( "/")! = -1) {urlstring.replace (urlstring, "/default.html");
해결책 3
답은 if (urlstring.find ( "/")! = -1) {urlstring.replace (urlstring, "/default.html")입니다.
다른 팁
부스트 스트링 알고리즘 라이브러리에는 효과적인 교체가 있습니다 특징.
어쩌면 당신은 regexp를 사용하여 일을 할 수 있습니다! : regexlib.com
제휴하지 않습니다 StackOverflow