Print Page | Close Window

How to convert capital letter to lowercase?

Printed From: MetaCase
Category:
Forum Name: MetaEdit+
Forum Description: All topics relating to MetaEdit+ or DSM
URL: https://www.metacase.com/forums/forum_posts.asp?TID=766
Printed Date: 27.Mar.2026 at 00:36
Software Version: Web Wiz Forums 12.05 - http://www.webwizforums.com


Topic: How to convert capital letter to lowercase?
Posted By: Jiarui
Subject: How to convert capital letter to lowercase?
Date Posted: 21.Feb.2014 at 16:06
Hi,
     When I define the generator, I used to use the same property sometimes capital letter but sometimes lowercase, I want to know how to convert capital letter to lowercase(for example I want to convert 'user' to 'User')?



Replies:
Posted By: stevek
Date Posted: 21.Feb.2014 at 16:11
You can do that with a http://www.metacase.com/support/50/manuals/mwb/Mw-5_8_5.html" rel="nofollow - translator . Several are already defined in the _translators generator in Graph, and you can use them, learn from them, and add new ones. If you call _translators() at the start of your generator, you can use them, e.g.
:MyProperty%lower


Posted By: Jiarui
Date Posted: 23.Feb.2014 at 14:35
First, Thank you very much, I define a generator like this:
  to '%upper
/^[a-z]/  [A-Z]'
 endto

I want the first lowercase of the property to change to it's corresponding upper letter. It doesn't work, Could you tell me why?


Posted By: stevek
Date Posted: 23.Feb.2014 at 15:19
Search for firstUpper here on the forums, I've just updated the http://www.metacase.com/forums/forum_posts.asp?TID=115&PID=1840&title=merl-translator-firstupper-for-sentence-case#1840" rel="nofollow - post to show an easy way in 5.0.
 
Your way doesn't work because the left-hand side and right-hand side aren't legal translator syntax: since the left-hand side is a regular expression, the right-hand side would have to be a string, so prefixed by $, not a character range (which wouldn't have [] brackets around it in any case). You can only have a character range on the right if you have a similar-sized set of characters or character range on the left (not a string or regular expression): e.g. a-z A-Z has 26-character ranges on both the left and right.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.05 - http://www.webwizforums.com
Copyright ©2001-2022 Web Wiz Ltd. - https://www.webwiz.net