How to convert capitalize of first letter of word

Input:
NEW YORK
INDONESIA
CZECH REPUBLIC

Need output like:
New York
Indonesia
Czech Republic

Thanks
shaik

  1. Use an Assign activity to create your list:

inputStrings = New List(Of String) From {“NEW YORK”, “INDONESIA”, “CZECH REPUBLIC”}

2.For Each Activity:
Use a For Each loop to iterate over inputStrings.

Set the type argument to String.
3.Inside the loop, use an Assign activity:
item = StrConv(item, VbStrConv.ProperCase)

4.use Write Line or Log Message To check the Output

@shaik.muktharvalli1,

You can do it like this for a string

StrConv("NEW YORK".ToLower(), VbStrConv.ProperCase)

Getting error like:

thanks
shaik

I am using below code not working

StrConv(CurrentRow(“Country”).ToString.ToLower(),VbStrConv.ProperCase)

@shaik.muktharvalli1,

What’s the error?

I have pasted above please check @ashokkarale

Error:

Assign: No data is available for encoding 1252. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.

thanks
shaik

@shaik.muktharvalli1,

Can you try this one

outputString = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(CurrentRow("Country").ToString.ToLower())

Thank you @ashokkarale it’s working fine now

1 Like

Sequence.xaml (7.7 KB)

alternate Linq Method

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.