Advertisement
5_2007-2008 Debugging and Error Handling #174756

ProperCase

If you've used ASP for a while you'll notice that VBScript doesn't support StrConv so you can't proper case your code. Here is small function to include in your ASP that will do that for you.

AI

ملخص الذكاء الاصطناعي: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

كود المصدر
original-source
Function ProperCase(sString)
  Dim lTemp
  Dim sTemp, sTemp2
  Dim x
  sString = LCase(sString)
  If Len(sString) Then
    sTemp = Split(sString, " ")
    lTemp = UBound(sTemp)
    
    For x = 0 To lTemp
      sTemp2 = sTemp2 & UCase(Left(sTemp(x), 1)) & Mid(sTemp(x), 2) & " " 
    Next
    ProperCase = trim(sTemp2)
  Else
    ProperCase = sString
  End If
End Function
التعليقات الأصلية (3)
مسترجع من Wayback Machine