首页 > 其他分享 >一些有用的自定义函数(抄录)

一些有用的自定义函数(抄录)

时间:2023-11-29 12:01:25浏览次数:36  
标签:Function Dim String 自定义 strChar strMsg strText 有用 抄录

提取字符串中的数字

'提取字符串中的数字
Function GetDigits(strText  As String )  As String
Dim strChar  As String , strMsg  As String
Dim i  As Long
strMsg =  ""
For i = 1  To Len(strText)
    strChar = Mid(strText, i, 1)
    If strChar  Like "#" Then strMsg = strMsg & strChar
Next
GetDigits = strMsg
End Function

效果:

一些有用的自定义函数(抄录)_字符串



标签:Function,Dim,String,自定义,strChar,strMsg,strText,有用,抄录
From: https://blog.51cto.com/u_9928055/8613818

相关文章

  • SpringBoot JPA实践之EntityManage查询返回自定义DTO entityManager.createNativeQuer
    SpringBootJPA实践之EntityManage查询返回自定义DTOentityManager.createNativeQuery(sql)  在很多时候我更喜欢随意组合查询出来返回一个DTO对象的实现,JPA提供的多数查询均以返回Entity居多,它提供的EntityManager对象可以实现将SQL语句查询的结果转换为自定义DTO对象(这与......
  • el select 选项多列,换行,表格,数据量大,全部显示,自定义el-select,el-select插入表格
    1、效果图:2、实现:自定义下拉框内容,采用radio或checkbox作为选项绑定值<template><el-selectv-model="selectValue"v-bind="$attrs"clearable><!--隐藏的option组件,展示下面的插槽--><el-optionv-show="false"/><!--......
  • uhttp luci cgi-bin 自定义输出内容
    uhttplucicgi-bin自定义输出内容来源  https://www.cnblogs.com/osnosn/p/17131543.html 参考【ExampleofwebinterfaceusinguHTTPdandLua】【Lua5.1ReferenceManual】openwrt,op18,op19,op21,op22都是用的lua-5.1.5。修改openwrtuhttpd使用的ssl......
  • 自定义应用层通信协议结构消息的编码方式
    应用层通信协议设计 一、应用层通信协议概述TCP/UDP是基于字节流的传输层通信协议,对于其的编程是基于IO流编程,所谓“流”,就是没有界限的一长串二进制数据。TCP/UDP作为传输层协议,并不了解上层业务数据的具体含义,它会根据TCP缓冲区的实际情况进行数据包的划分。所以在业务上......
  • springboot 自定义响应体大小测试接口
    @ResponseBody@RequestMapping("/def/response/body/service")publicStringBuilderdefResponseBodyService(@RequestParam(name="count")Integercount,HttpServletRequestHttpRequest)throwsInterruptedException{  StringbaseStr="0......
  • Qt给QRadioButton设置自定义样式
    一、概述做一个好看的QRadioButton。可以选中,取消选中。二、代码示例1.样式QRadioButton::indicator::unchecked{border-image:url(images/user_protocol_uncheck.webp);}QRadioButton::indicator::checked{border-image:url(images/user_protocol_......
  • C# 比使用app.config,用自定义的ConnectionString
    usingSystem.Data;usingSystem.Data.SqlClient;usingSystem.IO;usingSystem.Reflection;namespaceAssist{publicclassContextHelper{publicstaticstringConnectionString;publicstaticstringSerializePath=Path.GetDirector......
  • 自定义滚动条样式
    在要添加滚动条的标签样式中添加,注意lang="less“1::-webkit-scrollbar{2width:12px;3background-color:#f1f1f1;4}5/*定义滑块内阴影+圆角*/6::-webkit-scrollbar-thumb{7background-color:#cac8c8;8border:2pxsolid#f1f1f......
  • 直播系统代码,Android自定义View实现呼吸灯效果
    直播系统代码,Android自定义View实现呼吸灯效果自定义View的属性定义attrs.xml如下: <resources>  <declare-styleablename="BreathView">    <attrname="centerCircleRadius"format="dimension"/>    <attrname="circleCol......
  • 直播平台搭建,自定义气泡效果(BubbleView)
    直播平台搭建,自定义气泡效果(BubbleView) packagecom.example.myapplication;importandroid.content.Context;importandroid.graphics.BlurMaskFilter;importandroid.graphics.Canvas;importandroid.graphics.Color;importandroid.graphics.Paint;importandroid.graphics.......