Мне интересно, возможно ли отсортировать NSArray из NSStrings на основе числового значения, содержащегося в нем. В основном это список идентификаторов процессов и имен процессов, и я хотел бы отсортировать процессы по их идентификатору. Массив выглядит так:
"286 Google Chrome He",
"1209 ibtool",
"0 kernel_task",
"1 launchd",
"10 kextd",
"11 notifyd",
"12 diskarbitrationd",
"13 configd",
"14 syslogd",
"15 DirectoryService",
"16 distnoted",
"18 ntpd",
"22 SystemStarter",
"25 securityd",
"28 mds",
"29 mDNSResponder",
"30 loginwindow",
"31 KernelEventAgent",
"33 hidd",
"34 fseventsd",
"36 dynamic_pager",
"42 blued",
"43 autofsd",
"46 WDSmartWareD",
"47 WDDMService",
"61 coreservicesd",
"62 WindowServer",
"71 HWPortCfg",
"72 HWNetCfg",
"159 socketfilterfw",
"165 cvmsServ",
"177 coreaudiod",
"191 vmnet-bridge",
"196 vmnet-dhcpd",
"198 vmnet-netifup",
"200 vmnet-dhcpd",
"204 vmnet-natd",
"206 vmnet-netifup",
"220 launchd",
"224 Dock",
"225 SystemUIServer",
"226 Finder",
"228 pboard",
"229 fontd",
"240 UserEventAgent",
"247 AirPort Base Sta",
"252 iprint-listener",
"253 StatusMenu",
"254 Dropbox",
"271 dbfseventsd",
"275 Google Chrome",
"295 Google Chrome He",
"298 AppleSpell",
"634 Google Chrome He",
"696 Google Chrome He",
"730 Microsoft Word",
"733 Microsoft Databa",
"736 Microsoft AU Dae",
"1095 usbmuxd",
"1110 Xcode",
"1171 Interface Builde",
"1282 Interface Builde",
"1283 Interface Builde",
"1475 Google Chrome He",
"1531 Google Chrome He",
"1533 Google Chrome He",
"1681 Google Chrome He",
"1682 Google Chrome He",
"1686 Google Chrome He",
"1687 Google Chrome He",
"1692 Google Chrome He",
"1945 Google Chrome He",
"2088 Keynote",
"2268 Google Chrome He",
"2326 Google Chrome He",
"2481 Google Chrome He",
"2545 Google Chrome He",
"2596 Google Chrome He",
"2766 mdworker",
"2933 Google Chrome He",
"2963 iPhone Simulator",
"2967 SimulatorBridge",
"2970 lsd",
"2971 SpringBoard",
"2982 ocspd",
"2998 installd",
"3000 TableViewControl",
"3001 taskgated",
"3002 gdb-i386-apple-d"
Любая помощь очень ценится!