SORU
8 Temmuz 2009, ÇARŞAMBA


Objective-C: yol dizeden dosya Ayıklamak

/Users/user/Projects/thefile.ext NSString ben ne zaman Nesnel-C yöntemleri ile thefile ayıklamak istiyorum.

Bunu yapmak için en kolay yolu nedir?

CEVAP
8 Temmuz 2009, ÇARŞAMBA


The NSString reference, kullanabilirsiniz :

NSString* theFileName = [[string lastPathComponent] stringByDeletingPathExtension]

LastPathComponent arama "dosyaadı.döndürür"ve stringByDeletingPathExtension çıkarın .ext sonunda ext.

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Gali B

    Gali B

    1 EYLÜL 2006
  • Google Developers

    Google Devel

    23 AĞUSTOS 2007
  • Keith Anthe

    Keith Anthe

    26 NİSAN 2011