문제

I have a file being loaded into fd.ChosenName and wondering if there is a quick solution such as an opposite to stringbuilder to truncate a file name (extension) for display purposes. So if the value of fd.ChosenName is picture1.jpg I could actually display the text picture1 in a panel etc.

도움이 되었습니까?

해결책

str.SubString2(0, str.LastIndexOf("."))

Edited for correct answer

SubString2 takes 2 parameters, beginIndex and endIndex

Reference: http://www.basic4ppc.com/android/help/core.html#string

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top