Home > Posts > VBScript function to capitalize a Greek string ignoring punctuation marks

VBScript function to capitalize a Greek string ignoring punctuation marks

Function Caps(txt)
Dim result
result = ""
Dim i
Dim c
for i = 1 to len(txt)
  c = UCase(mid(txt,i,1))
  select case c
   case "Ά"
    c="Α"
   case "Έ"
    c="Ε"
   case "Ή"
    c="Η"
   case "Ί"
    c="Ι"
   case "Ϊ"
    c="Ι"
   case "Ό"
    c="Ο"
   case "Ύ"
    c="Υ"
   case "Ϋ"
    c="Υ"
   case "Ώ"
    c="Ω"
  end select
  result = result + c
next
Caps=result
End Function

Advertisements
Categories: Posts
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: