How can I remove quotes from an NSString?

I am trying to remove quotes from something like:


so that the string is just:


-------------Problems Reply------------

Check out Apple's docs:

You probably want:


Returns a new string in which all occurrences of a target string in the receiver are replaced by another given string.

- (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement

So, something like this should work:

newString = [myString stringByReplacingOccurrencesOfString:@"\"" withString:@""];

Category:iphone Views:0 Time:2010-11-08

Related post

  • Remove quotes from named environement variables in Windows scripts 2008-11-20

    I want to store a URL prefix in an Windows environment variable. The ampersands in the query string makes this troublesome though. For example: I have a URL prefix of "", and want to create a full URL by providing a v

  • Remove quotes with SED 2010-11-22

    I am tracking some keywords on Twitter using the command below. I want to print just the "screen_name" property of the tweet author. I could get the command below working but want to remove "quotes" from the author screen_name. How could I do this? c

  • Remove quotes on "quoted form of" in Applescript? 2011-06-13

    I have the following code to copy paths of multiple selected items in Finder: activate application "Finder" tell application "Finder" set theSel to (selection of application "Finder") set pathList to {} repeat with anItem in theSel set the end of pat

  • A regular expression to remove quotes when there is no whitespace in between 2011-06-25

    I want to remove quotes in a string when there are no whitespaces between those quotes. Here is an example: "foobar" should be foobar "foo bar" should be "foo bar" I am using php and preg_replace() Thanks in advance. --------------Solutions----------

  • Repeat remove quotes from 48 fields 2012-02-23

    This script below works on a field by field basis, and removes the quotes at the beginning and the end of every entry, BUT if you have more than 3 or 4 columns, copying, pasting changing to every new column name takes a huge amount of time. Any idea

  • NSScanner Remove Substring Quotation from NSString 2011-02-27

    I have NSString's in the form of Johnny likes "eating" apples. I want to remove the quotations from my strings so that. Johnny likes "eating" apples becomes John likes apples I've been playing with NSScanner to do the trick but I'm getting some crash

  • how to remove quote and slash from string in iphone 2011-09-13

    Hi friends... I am using regular expression so I get string but with double quote and slash but I dont want that. I want string value without slash and double quotes. I try this I'm but not getting proper answer. I get error after running application

  • Remove Quotes and Commas from a String in MySQL 2008-08-11

    I'm importing some data from a CSV file, and numbers that are larger than 1000 get turned into 1,100 etc. What's a good way to remove both the quotes and the comma from this so I can put it into an int field? Edit: The data is actually already in a M

  • append removing quotes 2009-07-30

    This is a fairly simple problem but I can't find a solution. I write some xml to a hidden div on tha page and i read it later on. The problem is that some quotes are being removed when writing to the div and because of this I can't load the use the x

  • Regular expression for removing quotes from quoted numbers in a string 2009-10-05

    Let's say I have a bunch of text like this (simplified example, but you get the idea): INSERT stuff(a,b,c) VALUES('1','a','1'); INSERT stuff(a,b,c) VALUES('2','b','1'); INSERT stuff(a,b,c) VALUES('3','c','2'); INSERT stuff(a,b,c) VALUES('4','d','2');

  • How do I remove '\' characters from my NSString 2010-08-27

    \/images\/content\/booking_thumbs_uk\/s_kl\/50000\/THB_999_H54007.jpg changes to: /images/content/booking_thumbs_uk/s_kl/00000/THB_999_H2470.jpg --------------Solutions------------- NSString* [email protected]"\\/images\\/content\\/booking_thumbs_uk\\/s_kl\

  • How do I remove quotes from a string? 2010-11-19

    $string = "text"; How to remove all types of quotes (different languages) from $string? --------------Solutions------------- str_replace('"', "", $string); str_replace("'", "", $string); I assume you mean quotation marks? Otherwise, go for some regex

  • Remove quotes from json object 2010-11-22

    How to remove the quotes from json object: Using php, i get the data in the following format(display the data using console.log()) [ ["Catching the Wind in Rural Malawi § SEEDM...", "3"], ["Engineering § SEEDMAGAZINE.COM...", "2"], ["Technology Revie

  • Remove part of an NSString 2010-12-12

    I have an NSString as follows: <img alt="996453912" src="" /><a href="">Shop4Tech Coupons</a> I only need the first part (before the

  • Python CSV: Remove quotes from value 2011-01-20

    I have a process where a CSV file can be downloaded, edited then uploaded again. On the download, the CSV file is in the correct format, with no wrapping double quotes 1, someval, someval2 When I open the CSV in a spreadsheet, edit and save, it adds

  • Regex to remove quotes from img tag 2011-03-09

    I need to remove all quotes from an image tag found within lots of other text. For example, I want to make <img src="folder/image.gif" target="_blank" /> into <img src=folder/image.gif target=_blank /> I'm using vb, and need to use a regE

  • Removing quotes from string 2011-04-21

    So I thought this would just be a simple issue however I'm getting the incorrect results. Basically I am trying to remove the quotes around a string. For example I have the string "01:00" and I want 01:00, below is the code on how I thought I would b

  • How to remove empty space from NSString in iPhone 2011-07-04

    i am getting one url from the server http: / /, however due to space in between them it is not opening, please let me know how to remove the space in between them, so that it should open in safari. --------------Solutions------------- T

  • Regex remove quotes around integers? 2011-07-19

    Let's say I have a string "\"Bob\",\"1\",\"Mary\",\"2\"". Is it possible to remove only the quotes around the numbers and not the letters? I've tried look-ahead/behind but the non variable length for look-behind screwed me and I have no idea how to s

Copyright (C), All Rights Reserved.

processed in 0.112 (s). 11 q(s)