Advertisement
jiue123

Cách đổi ký tự thành chữ Hoa or Thường PHP vs JQ

Dec 16th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. string = "abc";
  2.  
  3. ucfirst("string") (PHP) return("Abc"); in ký tự đầu tiên trong chuỗi thành chữ in hoa.
  4.  
  5. string.toUpperCase() (JQ) return("ABC"); in toàn chuỗi thành chữ hoa.
  6.  
  7. string.charAt(0) (JQ) return("A"); lấy ký tự đầu tiên trong chuỗi.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement