Len (), lift (), Right () does not recognize Chinese solutions

zhaozj2021-02-16  57

The following uses is the same as Len (), Lift (), Right ().

Function Strlength (Str) Temp_Str = Len (Str) For I = 1 To Temp_StrTest_Str = (Mid (Str, I, 1)) If Asc (Test_Str)> 0 ThenStrlength = Strlength 1ElseStrlength = Strlength 2End IfNextEnd FunctionFunction Strleft (Str, L) Temp_str = len (str) for i = 1 to Temp_STRTEST_STR = (MID (STR, I, 1)) StrLeft = strLeft & test_strif asc (test_str)> 0 Thenlens = LENS 1ELSELENS = LENS 2END IFIF LENS> = L1EN EXIT ForNextEnd FunctionFunction Strright (Str, L) Temp_Str = Len (Str) For i = Temp_Str to 1 step -1Test_Str = (Mid (Str, I, 1)) Strright = test_Str & StrrightIf Asc (test_Str)> 0 Thenlens = lens 1Elselens = lens 2END IFIF LENS> = L THEN EXIT forNextend Function

转载请注明原文地址:https://www.9cbs.com/read-23957.html

New Post(0)