mingyang_text 2022.8.8 → 2022.9.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/text.js +23 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mingyang_text",
3
- "version": "2022.08.08",
3
+ "version": "2022.09.27",
4
4
  "description": "MingYang Packet",
5
5
  "main": "text.js",
6
6
  "scripts": {
package/text.js CHANGED
@@ -109,7 +109,8 @@ function func_Filter(args_Text, args_Bin, args_End) {
109
109
  }
110
110
  }
111
111
 
112
- t_Line = args_Text.substr(t_iBin + args_Bin.length, t_iEnd - t_iBin - args_Bin.length);
112
+ //t_Line = args_Text.substr(t_iBin + args_Bin.length, t_iEnd - t_iBin - args_Bin.length);
113
+ t_Line = args_Text.substring(t_iBin + args_Bin.length, t_iEnd);
113
114
  t_Result.push(t_Line);
114
115
 
115
116
  t_Start = t_iEnd + args_End.length;
@@ -135,15 +136,35 @@ function func_TimeID_32() {
135
136
  }
136
137
  module.exports.do_TimeID_32 = func_TimeID_32;
137
138
 
139
+ /**
140
+ * 返回一个36位的时间在左侧的UUID
141
+ */
142
+ function func_TimeNo_36() {
143
+ return func_TimeID(36, "0123456789");
144
+ }
145
+ module.exports.do_TimeNo_36 = func_TimeNo_36;
146
+
147
+ /**
148
+ * 返回一个32位的时间在左侧的UUID
149
+ */
150
+ function func_TimeNo_32() {
151
+ return func_TimeID(32, "0123456789");
152
+ }
153
+ module.exports.do_TimeNo_32 = func_TimeNo_32;
154
+
138
155
  /**
139
156
  * 返回一个时间在左侧的UUID
140
157
  */
141
- function func_TimeID(args_Digit) {
158
+ function func_TimeID(args_Digit, args_PlaceHolder) {
142
159
  let temp_List = new Array(args_Digit);
143
160
 
144
161
  //let temp_PlaceHolder = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
145
162
  let temp_PlaceHolder = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
146
163
 
164
+ if (args_PlaceHolder != null) {
165
+ temp_PlaceHolder = args_PlaceHolder;
166
+ }
167
+
147
168
  let temp_Time = func_DateTimeToString(null, "yyyy-MMdd-HHmmss-fff");
148
169
  for (let i = 0; i < temp_Time.length; i++) {
149
170
  temp_List[i] = temp_Time[i];