2

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.

Tony Moreira
  • 93
  • 3
  • 18

1 Answers1

3
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

Vigrond
  • 8,148
  • 4
  • 28
  • 46