Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/askmiw/mipy
获取拼音首字母
https://github.com/askmiw/mipy
Last synced: about 2 months ago
JSON representation
获取拼音首字母
- Host: GitHub
- URL: https://github.com/askmiw/mipy
- Owner: askmiw
- Created: 2015-06-02T06:10:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-31T05:52:02.000Z (over 6 years ago)
- Last Synced: 2023-03-02T05:23:36.904Z (almost 2 years ago)
- Language: Swift
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MiPY
获取拼音首字母,支持取一句话中每字拼音首字母
``` swift
//
// PYFirst.swift
// 获取拼音首字母,支持取一句话中每字拼音首字母
// Created by 周蜜([email protected]) on 2015/6/1(儿童节).
// Copyright (c) 2015年 www.miw.cn. All rights reserved.
///*
//调用示例,返回#
var s :String?
PYFirst(s)
s = "中华人民共和国@hi wor\r\nld."
//调用示例,返回ZHRMGHGW
PYFirst(s,true)
//调用示例,返回Z
PYFirst(s)
*/
```
# 安装:
只需要简单地将PYFirst.swift拖入你的工程即使可以