문제

I'm trying to get the directory name from a path string using nant. However, whenever I use the following:

<property name="lastBackSlash" value="${string::last-index-of('${foldername}', '\')}" />

... this returns -1. I am sure the foldername contains a path with backslashes.

Am I doing something wrong?

도움이 되었습니까?

해결책

Too many dollar signs, assuming of course, that foldername is a property.

<property name="lastBackSlash" value="${string::last-index-of(foldername, '\')}" />
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top