LTrim()
LTrim()函数 去掉字符串截去首尾连续空白 .
表达式 String LTrim('源字符串'),
'源字符串',输入类型为字符,需要处理的源字符串。
asp 实例:
<%
strTest = " This is a test!"
response.write LTrim(strTest)
%>
返回结果: This is a test!
asp.net 实例:
logic.aspx
<%@ Page language="c#" AutoEventWireup="false" Inherits="NoahWeb.Engine" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>NoahWeb示范</title>
</head>
<body>
<!-- #BeginLibraryItem "/Library/lout.lbi" -->逻辑层输出位点<!-- #EndLibraryItem -->
</body>
</html>
逻辑层示例
此示例需要存在文件"logic.aspx"和当前名称空间下具有"viewmsg"字符资源。
<Action name="logic.demo" NextAction="">
<Out Area="/Library/lout.lbi">
<SetVar Name="message" Value="'[' ADD LTrim(' a b c d ') ADD ']'" />
<Echo ContentLinkId="viewmsg" />
</Out>
</Action>
示例输出
[a b c d]