Question

I ont un fichier chargé dans fd.ChosenName et se demander s'il y a une solution rapide tel qu'un opposée à stringbuilder pour tronquer un nom de fichier (extension) à des fins d'affichage. Donc, si la valeur de fd.ChosenName est picture1.jpg je pouvais afficher le photo1 texte dans un panneau etc.

Était-ce utile?

La solution

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

Edité pour la réponse correcte

SubString2 prend 2 paramètres beginIndex et endIndex

Référence: http://www.basic4ppc.com/android/help/ core.html string #

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top