Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

String Functions to extract first name initial and first 5 letters of last name

$
0
0

I am trying to extract the first letter of a firstname and the first 5 letters off a last name and concatate the two values

 

For example I have a data field with "John Smith" in the field.

 

I want to get the first letter of the first name -  "John" = J

I want to get the first 5 letters of the last name- "Smith" = smith

 

and then concatate the 2 values = jsmith

 

another example

 

For example I have a data field with "Reese Witherspoon" in the field.

 

I want to get the first letter of the first name -  "Reese" = R

I want to get the first 5 letters of the last name- "Witherspoon" = withe

 

and then concatate the 2 values = rwithe

 

How would I do that ?

 

I think I know how to do each step individually but is there a better way to get the value?


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>