zoukankan      html  css  js  c++  java
  • JS字符串大小写转换实现方式

    toLocaleUpperCase 方法:将字符转换为大写

    stringVar.tolocaleUpperCase( )

    必选的 stringVar 引用是一个 String 对象,值或文字。

    //转换成大写
    toUpperCase 方法
    返回一个字符串,该字符串中的所有字母都被转化为大写字母。

    strVariable.toUpperCase( )
    "String Literal".toUpperCase( )

    说明
    toUpperCase 方法对非字母字符不会产生影响。 

    toLocaleLowerCase 方法:将字符转换为小写

    stringVar.tolocaleLowerCase( )

    必选的 stringVar 引用是一个 String 对象,值或文字。


    toLowerCase 方法
    返回一个字符串,该字符串中的字母被转换为小写字母。

    strVariable.toLowerCase( )
    "String Literal".toLowerCase( )

    说明
    toLowerCase 方法对非字母字符不会产生影响。 

  • 相关阅读:
    mybatis plus 执行sql
    springboot 打印 mybatisplus 的sql
    easyexcel 简单使用
    springboot ehcache
    easyexcel 时间转换
    springboot stopwatch
    c# 开机自动启动
    sqlHelper
    DirectX录音
    c# 发邮件
  • 原文地址:https://www.cnblogs.com/sky6699/p/4800329.html
Copyright © 2011-2022 走看看