gpt4 book ai didi

【JSTL基础入门教程】fn:toUpperCase()函数

转载 作者:Q123 更新时间:2024-01-04 23:10:11 25 4
gpt4 key购买 nike

JSTL fn:toUpperCase() 函数将指定字符串中的所有字符转为大写。

语法

JSP fn:toUpperCase() 函数的语法如下。
String fn:toUpperCase(String sourceStr)
其中,sourceStr 为指定的字符串。

示例

下面为 fn:toUpperCase() 函数的简单实例。
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html>
<html>
<head>
<title>编程帮(www.biancheng.net)</title>
</head>
<body>
    <c:set var="msg" value="Welcome to bianchengbang" />
    ${fn:toUpperCase(msg)}
</body>
</html>

页面输出内容如下:

WELCOME TO BIANCHENGBANG

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com