Skip to main content
Code Review

Return to Question

deleted 22 characters in body; edited title
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

Is there a more optimal way to write the following encoding Encoding and then assignassigning the result to a label?

Is there a more optimal (or concise) way to write the following:

I have to do some encoding and then assign the result to a label. Is there a more optimal (or concise) way to write this?

// encoding fix 
NSString *correctStringTitle = [NSString stringWithCString: [[item objectForKey:@"main_tag"] cStringUsingEncoding:NSISOLatin1StringEncoding] 
 encoding: NSUTF8StringEncoding];
cell.titleLabel.text = [correctStringTitle capitalizedString];

Is there a more optimal way to write the following encoding and then assign the result to a label?

Is there a more optimal (or concise) way to write the following:

I have to do some encoding and then assign the result to a label.

// encoding fix 
NSString *correctStringTitle = [NSString stringWithCString: [[item objectForKey:@"main_tag"] cStringUsingEncoding:NSISOLatin1StringEncoding] 
 encoding: NSUTF8StringEncoding];
cell.titleLabel.text = [correctStringTitle capitalizedString];

Encoding and assigning the result to a label

I have to do some encoding and then assign the result to a label. Is there a more optimal (or concise) way to write this?

// encoding fix 
NSString *correctStringTitle = [NSString stringWithCString: [[item objectForKey:@"main_tag"] cStringUsingEncoding:NSISOLatin1StringEncoding] 
 encoding: NSUTF8StringEncoding];
cell.titleLabel.text = [correctStringTitle capitalizedString];
reformatted code to make a little more readable given limitations of narrow SE screen
Source Link

Is there a more optimal (or concise) way to write the following:

I have to do some encoding and then assign the result to a label.

// encoding fix 
NSString *correctStringTitle = [NSString stringWithCString:[[item objectForKey:@"main_tag"] cStringUsingEncoding:NSISOLatin1StringEncoding] encoding:NSUTF8StringEncoding];
cell.titleLabel.text = [correctStringTitle capitalizedString];
 

Is there a more optimal (or concise) way to write the following:

I have to do some encoding and then assign the result to a label.

// encoding fix 
NSString *correctStringTitle = [NSString stringWithCString:[[item objectForKey:@"main_tag"] cStringUsingEncoding:NSISOLatin1StringEncoding] encoding:NSUTF8StringEncoding];
cell.titleLabel.text = [correctStringTitle capitalizedString];
 

Is there a more optimal (or concise) way to write the following:

I have to do some encoding and then assign the result to a label.

// encoding fix 
NSString *correctStringTitle = [NSString stringWithCString:[[item objectForKey:@"main_tag"] cStringUsingEncoding:NSISOLatin1StringEncoding] encoding:NSUTF8StringEncoding];
cell.titleLabel.text = [correctStringTitle capitalizedString];
 
Improved word usage and removed redundant thanks (we thank by voting).
Source Link

Is there a more optimumoptimal way to write the following encoding and then assign the result to a label?

IIs there a more optimal (or consiceconcise) way to write the following:

I have to do some encoding and then assign the result to a label.

thanks for any help

// encoding fix 
NSString *correctStringTitle = [NSString stringWithCString:[[item objectForKey:@"main_tag"] cStringUsingEncoding:NSISOLatin1StringEncoding] encoding:NSUTF8StringEncoding];
cell.titleLabel.text = [correctStringTitle capitalizedString];
 

Is there a more optimum way to write the following encoding and then assign the result to a label?

I (or consice) way to write the following:

I have to do some encoding and then assign the result to a label.

thanks for any help

// encoding fix 
NSString *correctStringTitle = [NSString stringWithCString:[[item objectForKey:@"main_tag"] cStringUsingEncoding:NSISOLatin1StringEncoding] encoding:NSUTF8StringEncoding];
cell.titleLabel.text = [correctStringTitle capitalizedString];
 

Is there a more optimal way to write the following encoding and then assign the result to a label?

Is there a more optimal (or concise) way to write the following:

I have to do some encoding and then assign the result to a label.

// encoding fix 
NSString *correctStringTitle = [NSString stringWithCString:[[item objectForKey:@"main_tag"] cStringUsingEncoding:NSISOLatin1StringEncoding] encoding:NSUTF8StringEncoding];
cell.titleLabel.text = [correctStringTitle capitalizedString];
 
deleted 80 characters in body
Source Link
Loading
Source Link
Loading
lang-c

AltStyle によって変換されたページ (->オリジナル) /