mastodon-ios/Mastodon/Extension/String.swift

19 lines
319 B
Swift

//
// String.swift
// Mastodon
//
// Created by sxiaojian on 2021/3/2.
//
import Foundation
extension String {
func capitalizingFirstLetter() -> String {
return prefix(1).capitalized + dropFirst()
}
mutating func capitalizeFirstLetter() {
self = self.capitalizingFirstLetter()
}
}