• thymeleaf


    
    

    判断是不是为空:null: 

    <span th:if="${name} != null">不为空</span> 
    <span th:if="${name} == null">为空</span> 

    判断是不是为空字符串: “” 

    <span th:if="${#strings.isEmpty(name)}">空的</span> 
    

    判断是否相同: 

    <span th:if="${name} eq 'aaa'">相同于aaa,</span> 
    <span th:if="${name} ne 'aaa'">不相同于aaa,</span> 
    

    不存在设置默认值: 

    <span th:text="${name2} ?: '默认值'"></span> 
    

    是否包含(分大小写): 

    <span th:if="${#strings.contains(name,'ez')}">包ez</span> 

    是否包含(不分大小写) 

    <span th:if="${#strings.containsIgnoreCase(name,'y')}">包j</span> 
    

    是否以""开始

    ${#strings.startsWith(name,'o')} 

    是否以""结束

    ${#strings.endsWith(name, 'o')} 

    下标

    ${#strings.indexOf(name,frag)}

    截取

    ${#strings.substring(name,3,5)}

    从prefix之后开始截取到最后

    ${#strings.substringAfter(name,prefix)}

    向前截取

    ${#strings.substringBefore(name,suffix)}

    替换

    ${#strings.replace(name,'las','ler')}

    拼字字符串在str前面

    ${#strings.prepend(str,prefix)}

    拼字字符串在str后面

    ${#strings.append(str,suffix)}

    大写

    ${#strings.toUpperCase(name)} 

    小写

    ${#strings.toLowerCase(name)}

    去除空格

    ${#strings.trim(str)} 

    长度

    ${#strings.length(str)} 

    截取0到5位,后面…点代替;最小是3位

    ${#strings.abbreviate(str,5)}

    点击onclick事件  add是方法名,param是参数

    th:onclick="'javascript:add('+${param}+')'"
    

    多条件判断

    th:if="${roleId eq 1 || roleId eq 2 || roleId eq 3 || roleId eq 4}"
    

      

  • 相关阅读:
    SAE/ISO standards for Automotive
    The J1850 Core
    SAE J1708 DS36277 MAX3444, DS75176B
    X431 元征诊断枪
    凯尔卡C68全球版汽车电脑诊断仪
    汽车王牌
    Vehicle’s communication protocol
    Vehicle Network Protocols -- ISO/KWP CAN CCD PCI SCI / SCP / Class 2
    On-board diagnostics -- Standards documents
    On-board diagnostics connector SAE J1962
  • 原文地址:https://www.cnblogs.com/single-man/p/12426984.html
Copyright © 2020-2023  润新知