discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strings, URL and path manipulation


From: Riccardo Mottola
Subject: Strings, URL and path manipulation
Date: Thu, 09 Aug 2012 11:21:25 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120715 Firefox/14.0.1 SeaMonkey/2.11

Hi,

do you think using path component manipulation methods should work with URLs? I'd expect them to, since the two things are so closely related. I did not check on the mac, the core I am running is gnustep only and I use my mac less and less.

Example:

I try: serviceUrl = [[dbs serverUrl] stringByDeletingLastPathComponent];

serverUrl http://cs13-api.salesforce.com/services/Soap/u/25.0/00DW00000012fxX
service URL: http:/cs13-api.salesforce.com/services/Soap/u/25.0

as you may see the "http://"; lost one slash: i suppose it is being interpreted as path and got normalized, removing the //.

Is that correct or not? Or should I convert the string to a NSURL, use the function as "URLByDeletingPathExtension" and similar and then getting the URL String back? Those are 10.6 methods and since I plan a port to mac 10.4/10.5 I'd like to avoid them.

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]