---
title: "NSString另类赋值方法"
author: "xhanxhanxhan"
date: "2011-01-05T10:56:21Z"
tags: []
categories: ["移动开发"]
slug: "nsstring"
draft: false
lastmod: "2011-01-05T10:57:19Z"
id: 859418
url: "https://blogs.iteye.com/blog/859418"
---

碰到比较长的赋值怎么办

可以这么写

 

输出结果 a = @"hello world!"

 

```
NSString* a = @"hello"
		     @" world";

// or
NSString* a = (@"hello"
		       @" world"
                       @"!");
```