OfficeÖйúÂÛ̳/AccessÖйúÂÛ̳

 ÕÒ»ØÃÜÂë
 ×¢²á

QQ怬

Ö»ÐèÒ»²½£¬¿ìËÙ¿ªÊ¼

·µ»ØÁÐ±í ·¢ÐÂÌû
²é¿´: 2046|»Ø¸´: 4
´òÓ¡ ÉÏÒ»Ö÷Ìâ ÏÂÒ»Ö÷Ìâ

[Access±¾Éí] Ϊʲôlenb("Ϊʲôlenb")=14¶ø²»µÈÓÚ10?

[¸´ÖÆÁ´½Ó]
Ìøתµ½Ö¸¶¨Â¥²ã
1#
·¢±íÓÚ 2006-5-21 06:25:00 | Ö»¿´¸Ã×÷Õß »ØÌû½±Àø |µ¹Ðòä¯ÀÀ |ÔĶÁģʽ
Ϊʲôlenb("Ϊʲôlenb")=14¶ø²»µÈÓÚ10?
·ÖÏíµ½:  QQºÃÓѺÍȺQQºÃÓѺÍȺ QQ¿Õ¼äQQ¿Õ¼ä ÌÚѶ΢²©ÌÚѶ΢²© ÌÚѶÅóÓÑÌÚѶÅóÓÑ
ÊÕ²ØÊÕ²Ø ·ÖÏí·ÖÏí ·ÖÏíÌÔÌû ¶©ÔĶ©ÔÄ
2#
·¢±íÓÚ 2006-5-21 06:43:00 | Ö»¿´¸Ã×÷Õß
ÒÔÏÂÊÇÒýÓÃÈýɽ¿ÍÔÚ2006-5-20 22:25:00µÄ·¢ÑÔ£º
Ϊʲôlenb("Ϊʲôlenb")=14¶ø²»µÈÓÚ10?





Unicodeʱ´úÁË¡£






3#
 Â¥Ö÷| ·¢±íÓÚ 2006-5-21 06:55:00 | Ö»¿´¸Ã×÷Õß
ÕæÊÇÉî°ÂµÄUnicode......
4#
·¢±íÓÚ 2006-5-21 07:37:00 | Ö»¿´¸Ã×÷Õß
ÖÐÓ¢ÎÄ»ìºÏ,¿ÉÒÔÓÃÏÂÃæµÄ·½·¨»»Ëã

Dim Str As String

Str = "Ϊʲôlenb"
For i = 1 To Len(Str)

c = Asc(Mid(Str, i, 1))
If c >= 0 And c < 128 Then
   Len2 = Len2 + 1 '¼ÆËãÓ¢ÎÄ
Else
   Len2 = Len2 + 2 '¼ÆËãÖÐÎÄ
End If
Next i

MsgBox Len2
5#
·¢±íÓÚ 2006-5-21 07:55:00 | Ö»¿´¸Ã×÷Õß
Ϊ·½±ãÄãʹÓ㬽«andymarkÌṩµÄ·½·¨¸Ä³ÉÁ˺¯Êý¡£
Function myLen(strString As String) As Integer
Dim intNum As Integer
Dim i As Integer
For i = 1 To Len(strString)
    intNum = Asc(Mid(strString, i, 1))
        If intNum >= 0 And intNum < 128 Then
           myLen = myLen + 1 '¼ÆËãÓ¢ÎÄ
        Else
           myLen = myLen + 2 '¼ÆËãÖÐÎÄ
        End If
Next
End Function

ÄúÐèÒªµÇ¼ºó²Å¿ÉÒÔ»ØÌû µÇ¼ | ×¢²á

±¾°æ»ý·Ö¹æÔò

QQ|Õ¾³¤ÓÊÏä|СºÚÎÝ|ÊÖ»ú°æ|OfficeÖйú/AccessÖйú ( ÔÁICP±¸10043721ºÅ-1 )  

GMT+8, 2024-11-15 18:21 , Processed in 0.097008 second(s), 28 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí