Variation of Paul Leyten's Path Clipper thing.
splits a path up a path and shortens parts to make it shorter. e.g. c:\program files\blingblongblu\bah\bleh.exe c:\program...\blingbl...\bah\bleh.exe
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.
كود المصدر
Private Function ShortenPath(Path As String, MaxLen As Integer) As String
Dim bleh() As String
bleh = Split(Path, "\")
For x = 0 To UBound(bleh)
If Not x = UBound(bleh) Then
If Len(bleh(x)) > MaxLen Then
bleh(x) = Mid$(bleh(x), 1, MaxLen - 3) & "..."
End If
tmp = tmp & bleh(x) & "\"
Else
tmp = tmp & bleh(x)
End If
Next
ShortenPath = tmp
End Function
التعليقات الأصلية (3)
مسترجع من Wayback Machine