let aphabet = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
let smallCaps = ["0","1","2","3","4","5","6","7","8","9","ᴀ","ʙ","ᴄ","ᴅ","ᴇ","ғ","ɢ","ʜ","ɪ","ᴊ","ᴋ","ʟ","ᴍ","ɴ","ᴏ","ᴘ","ǫ","ʀ","s","ᴛ","ᴜ","ᴠ","ᴡ","x","ʏ","ᴢ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
func smallCapsFunc(text:String) -> String{
var charArray = text.components(separatedBy: "")
var i = 0
while i<charArray.count {
var letter:Int = aphabet.firstIndex(of: charArray[i])!
charArray[i] = smallCaps[letter]
i+=1
}
var string = charArray.joined(separator: "")
return string
}
smallCapsFunc(text: "hello")
If you have a clue please help me.
Thank you