First Character to Upper Case


/ Published in: XSLT
Save to your folder(s)

Generate the first character then show the remaining string.


Copy this code and paste it in your HTML
  1. <!-- generate first character -->
  2. <xsl:value-of select="concat( translate( substring( $MY-STRING, 1, 1 ),$lowerCase, $upperCase ), substring( @type, 2, string-length( $MY-STRING)))" />
  3.  
  4. <!-- generate remaining string -->
  5. <xsl:value-of select="substring($MY-STRING,2,string-length($MY-STRING)-1)" />

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.