简体   繁体   中英

How to remove doubleinvetedcoma in array make array on click table view Cell

i have one table view cell and user click on table cell then multipal value add in my Array variable i know how to add in array but problem is when i am add a value in array the value like this ["one","two","three","somthing"] .

i want to remove "" . Here is my code:

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString * cellValue=nil;
    if (tableView==nurseTypeTable) {
        cellValue=[arrayNurseType objectAtIndex:indexPath.row];
        NSLog(@"%@",cellValue);

        [_nurseArray addObject:cellValue];
        NSLog(@"%@",_nurseArray);
    } else {
        cellValue=[arraySpecialities objectAtIndex:indexPath.row];
         NSLog(@"%@",cellValue);
        [_selectionArray addObject:cellValue];
        NSLog(@"%@",_selectionArray);
    }
}

[_nurseArray addObject:cellValue];
NSLog(@"%@",_nurseArray);

here is my data show like this

YourNurse[2337:90b] (
    " one ",
    " two ",
    "three"
) 

How to remove "" in my Return data ?

please help me please share your valuable knowledge

As I said in comment, double quotes are displayed to let let you know it is a string.

Your value didn't contain the quotes. It's just the display formatting in Debug Area.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM