Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Capitalize first letter of a string

  1. #1
    Join Date
    Nov 2016
    Posts
    5

    Default Capitalize first letter of a string

    Is possible, mayse using String operations, to capitalize only the first letter of a String?

    heLLO --> Hello

  2. #2
    Join Date
    Oct 2014
    Posts
    15

    Default

    Yes, Use "String operations" and set InitCap as Y

  3. #3

    Default

    Yes, you can set the option like this:
    - Upper/Lower: lower
    - InitCap: Y

  4. #4
    Join Date
    Nov 2016
    Posts
    5

    Default

    Quote Originally Posted by qraforum View Post
    Yes, Use "String operations" and set InitCap as Y
    If I use your hint every first letter in the sentence is capitalized. I need only the first letter of the sentence capitalized

    today is a good day --> Today is a good day

    With your hint is

    today is a good day --> Today Is A Good Day

  5. #5
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    A User-Defined-Java-Expression could help:

    text == null ? null : text.substring(0,1).toUpperCase() + text.substring(1).toLowerCase()
    So long, and thanks for all the fish.

  6. #6
    Join Date
    Jun 2014
    Posts
    17

    Default

    You can use the step Manipulate String and set InitCap to Y
    Mahir ATTAR

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.