Obviously not for me lol.. I'm sorry, I'm just a little bit newbie in this and its giving me a headache just to get a simple name and extension from the path

On Sep 3, 2010, at 9:15 PM, Kumar Bibek wrote:

Use the file class. It's pretty straight forward.

-Kumar Bibek
http://techdroid.kbeanie.com

On Sep 4, 12:02 am, Jeremy Wadsack <[email protected]> wrote:
This is basic java. It's not Android specific.

String filename = "something.ext";
String extension = null;
int lastDotPosition = filename.lastIndexOf('.');
if( lastDotPosition > 0 ) {
  extension = filename.substring(lastDotPosition + 1);

}

--
Jeremy Wadsack

On Fri, Sep 3, 2010 at 11:57 AM, Pedro Teixeira
<[email protected]>wrote:

And how is that done?
I found examples in javascript using the lastindexof ...but cant find
anything for android java..

On Sep 3, 2010, at 6:52 PM, Filip Havlicek wrote:

Just select extension as string from . to the end and filename as string
from last / to last .

Best regards,
Filip Havlicek

2010/9/3 Maps.Huge.Info (Maps API Guru) <[email protected]>

Have you looked at File?

-John Coryat

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]<android-developers %[email protected]>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Pedro Teixeira

www.pedroteixeira.org

 --
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]<android-developers %[email protected]>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Pedro Teixeira

www.pedroteixeira.org

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to