---
title: "IOS字符串按特定字符拆分成数组"
author: "yourgame"
date: "2012-02-11T19:02:12Z"
tags: []
categories: ["移动开发"]
slug: "ios"
draft: false
lastmod: "2012-02-11T19:02:12Z"
id: 1402932
url: "https://yourgame.iteye.com/blog/1402932"
---

```java
NSString * fruits = @"apple,pair,banana,orange";
NSArray  * array= [fruits componentsseparatedbystring:@","];
```