CamelCase

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

CamelCase

Post by Pablo César » Sun Nov 10, 2013 12:03 am

I have looking for this important (at least for me) all around Harbour, Minigui and also HMG but not found anything about this.

Probably will be usefull for many programmers and also important to implement in IDE which is having strange behaviour (click here for more details) about lower modules names.

This Demo brings the function CamelCase which have different options, here goes the convention and descriptions:
Goal: CamelCase converts strings.

Wikipedia: CamelCase (camel case) or medial capitals is the practice of writing compound words or phrases such that each word or abbreviation begins with a capital letter. Camel case may start with a capital or, especially in programming languages, with a lowercase letter. Common examples are PowerPoint or iPhone.

Syntax: CamelCase( cText, [String to be converted]
                            <lForce>, [Optional, Default: .T.]
                            <aRemChar> [Optional, Default: space and underscore] )

Author: Pablo César Arrascaeta

Version: 1.0

CamelCase "Convention" for this procedure:
a. Verifies if the string is completly in upper or lower case.
b. In case lForce be not omitted, with value .F. and item A
   been false, CamelCase will not convert it, remaining as is it.
c. Being pass lForce as .T. will convert it.
d. If array is passed in aRemChar parameter, will consider these
   elements to be removed.
e. Upper case will converted followed by characters like as:
   Space -> " "
   UnderScore -> "_"
   Dot -> "."
   Hyphen -> "-"
   Slash -> "/"
   BackSlash -> "\"

Reasons to use:
   - As opposed to allowing programmers to choose any character sequence
   - To reduce the effort needed to read and understand source code
   - To enhance source code appearance
     (for example, by disallowing overly long names or unclear abbreviations)
I hope you enjoy and be usefull. :)
Attachments
CamelCase (Source files).rar
(7.47 KiB) Downloaded 152 times
CamelCase (Executable File).rar
(830.63 KiB) Downloaded 224 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Rathinagiri
Posts: 5266
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 171 times
Been thanked: 173 times
Contact:

Post by Rathinagiri » Sun Nov 10, 2013 4:21 am

Very nice and different Pablo. Useful too. Thanks for sharing.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
bpd2000
Posts: 1107
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 204 times
Been thanked: 109 times

Post by bpd2000 » Sun Nov 10, 2013 5:39 am

Hi Pablo,
Useful tool
Thanks for sharing.
BPD
Convert Dream into Reality through HMG

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 182 times

Post by Pablo César » Sun Nov 10, 2013 1:28 pm

Thank you both. Thanks to demostrate your interest. :)

Yes, usefull function also to convert full names... ;)

Rathinagiri, please feel you free to evaluate this example for including at HMG Samples for next releases or Claudio to include a new internal function at HMG IDE. :D
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
esgici
Posts: 4519
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 392 times
Been thanked: 112 times
Contact:

Post by esgici » Tue Nov 12, 2013 3:23 am

Pablo César wrote:I have looking for this important (at least for me) all around Harbour, Minigui and also HMG but not found anything about this.

Probably will be usefull for many programmers and also important to implement in IDE which is having strange behaviour (click here for more details) about lower modules names.

This Demo brings the function CamelCase which have different options,...

I hope you enjoy and be usefull. :)
Thank to share :)

This is important and interesting subject to me also.

So I want to participate, hopefully no problem will occurs :arrow:

Everything is for community and we haven't any aim other than to search the better.
TextCaseConverter.JPG
Screen sohot of Text Case Converter
TextCaseConverter.JPG (62.85 KiB) Viewed 2551 times
TextCaseConvSrc.zip
Source files of Text Case Converter
(216.4 KiB) Downloaded 153 times
TextCaseConvExe.zip
Executable of Text Case Converter
(1.21 MiB) Downloaded 134 times
Please don't forgive my faults and shortcomings;

every kind of bug report, advice, suggestions, criticism etc. are welcome :arrow:

Happy HMG :D
Viva INTERNATIONAL HMG :D

User avatar
bpd2000
Posts: 1107
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 204 times
Been thanked: 109 times

Post by bpd2000 » Tue Nov 12, 2013 4:39 am

Nice
Thank you Esgici for sharing
BPD
Convert Dream into Reality through HMG

User avatar
serge_girard
Posts: 2379
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 631 times
Been thanked: 127 times
Contact:

Post by serge_girard » Tue Nov 12, 2013 9:11 am

Thx for sharing!

Serge

User avatar
danielmaximiliano
Posts: 2183
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 187 times
Been thanked: 29 times
Contact:

Post by danielmaximiliano » Tue Nov 12, 2013 10:42 am

Hola Pablo :
sin duda es una buena aplicacion, gracias por compartir.

Hola Esgici :
hay un dicho que dice " 2 manos en un plato hace un garabato " aqui es exactamente todo lo contrario.
gracias por el granito de conocimiento que deja dentro de HMGforum.

Translate Google

Hi Pablol:
it certainly is a good app, thanks for sharing.

Hello Esgici:
There is a saying "two hands in a dish makes a scribble" here is exactly the opposite.
thanks for the knowledge granite HMGforum left inside.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`.HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. : +54901169026142
Telegram Name : DaNiElMaXiMiLiAnO

User avatar
Rathinagiri
Posts: 5266
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 171 times
Been thanked: 173 times
Contact:

Post by Rathinagiri » Tue Nov 12, 2013 10:53 am

That is very nice Esgici. Thanks for sharing.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
esgici
Posts: 4519
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 392 times
Been thanked: 112 times
Contact:

Post by esgici » Tue Nov 12, 2013 11:42 am

Hi Dave, Serge, Daniel and Rathi,

thanks to your interest and nice words :)
danielmaximiliano wrote: ..."two hands in a dish makes a scribble"...
This may be true for a PRIVATE dish ;)

There is another proverb :
two heads are better than one
Happy HMG :D
Viva INTERNATIONAL HMG :D

Post Reply