Limit Title Character...

<%
Function neatTrim( strToTrim, desiredLength )
strToTrim = trim( strToTrim )

if len( strToTrim ) < desiredLength then

neatTrim = strToTrim

exit function

else

if inStrRev( strToTrim, " ", desiredLength ) = 0 then

strToTrim = left( strToTrim, desiredLength - 1 ) & "&#133;"

else

strToTrim = left( strToTrim, inStrRev( strToTrim, " ", desiredLength + 1 ) -1 ) & "&#133;" 'no carriage return here

end if

end if

neatTrim = trim( strToTrim )

End Function


strLong = " This string is too long! "

strTrimmed = NeatTrim( strLong, 13 )

response.write( strTrimmed )
%>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
stream.skip.limit.map是Java 8中Stream API的一些操作方法。其中,skip(n)方法用于跳过前n个元素,limit(n)方法用于限制最多只能获取前n个元素,map(func)方法用于将每个元素通过传入的函数func进行映射转换。这些方法可以用于对集合或数组进行处理和转换。 例如,引用中的代码演示了如何将一个字符串数组中的每个字符串拆分为字符,并使用flatMap方法将所有字符合并为一个流,然后使用distinct方法去除重复的字符,最后使用forEach方法打印输出结果。 引用中的代码演示了如何使用limit方法限制只获取集合中的前n个元素。 引用中的代码演示了如何使用map方法将列表中的每个元素进行乘以2的操作,并将操作结果收集到一个新的列表中。 总结来说,stream.skip.limit.map是一系列可以用于对集合或数组进行处理和转换的方法,可以根据需求选择并使用它们。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [Stream入门(4)----skip、limit、map、flatMap](https://blog.csdn.net/qq_33304139/article/details/120586821)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值