//: Playground - noun: a place where people can play import UIKit var str = "hi" // 字符串拼接 str += ", rinpe" str += ", lili" // 创建一个空的字符串 var nullStr = String() var nullStr2 = "" // 判断一个字符串是否为空 nullStr.isEmpty // 字符串遍…
php课程 1-3 字符串变量输出方式有哪些(总结:四种) 一.总结 一句话总结:推荐使用双引号中加{$变量名}的形式(echo "my name is {$name}eee !";),加快开发效率.如果要提升运行效率,用单引号加点连接的形式(echo 'my name is '.$name.' !';). 1.四种字符串变量输出方式中哪种最方便? 维护方便,开发方便 第三种:双引号包裹变量+大括号包裹变量 3 $name='user1'; 8 echo "my name i…
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: s = "leetcode" return 0. s = "loveleetcode", return 2. Note: You may assume the string contain only lowercase…