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

CamelCase

Post by Pablo César »

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 269 times
CamelCase (Executable File).rar
(830.63 KiB) Downloaded 340 times
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: CamelCase

Post by Rathinagiri »

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: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: CamelCase

Post by bpd2000 »

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

CamelCase

Post by Pablo César »

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: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: CamelCase

Post by esgici »

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.
Screen sohot of Text Case Converter
Screen sohot of Text Case Converter
TextCaseConverter.JPG (62.85 KiB) Viewed 4721 times
TextCaseConvSrc.zip
Source files of Text Case Converter
(216.4 KiB) Downloaded 279 times
TextCaseConvExe.zip
Executable of Text Case Converter
(1.21 MiB) Downloaded 261 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: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: CamelCase

Post by bpd2000 »

Nice
Thank you Esgici for sharing
BPD
Convert Dream into Reality through HMG
User avatar
serge_girard
Posts: 3165
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: CamelCase

Post by serge_girard »

Thx for sharing!

Serge
There's nothing you can do that can't be done...
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: CamelCase

Post by danielmaximiliano »

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.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: CamelCase

Post by Rathinagiri »

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: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: CamelCase

Post by esgici »

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