Write a visual basic procedure which takes a string as argument and display the following:The string with its first and last characters in uppercase and all other characters in lowercase.

Showing Answers 1 - 1 of 1 Answers

Umesh

  • Sep 17th, 2007
 

Public String ConvertString(string str)

  dim newStr as stringbuilder
  newStr.append(String.ToUpper(str.left(1))
  newStr.append(String.ToLower(str.substring(2,str.length-1)))
  newstr.append(String.ToUpper(str.right(1))

  return newStr.ToString()
End Sub

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions