amir0914 15 Posted Tuesday at 06:49 PM (edited) Hi everyone, I'm trying to find a function in Autolisp like "PROPER" function in excel. this function in excel sets the first character in a text string to uppercase, like : test >> Test t >> T autolisp >> Autolisp pc >> Pc Is there the function in Autolisp? Edited Tuesday at 06:55 PM by amir0914 Quote Share this post Link to post Share on other sites
ronjonp 224 Posted Tuesday at 07:09 PM I think you mean titlecase . 1 Quote Share this post Link to post Share on other sites
Tharwat 161 Posted Tuesday at 07:18 PM (strcat (strcase (substr "test" 1 1)) (substr "test" 2)) 1 Quote Share this post Link to post Share on other sites
tombu 79 Posted Tuesday at 07:41 PM (load "TcaseSup.lsp")(acet-tcase-change-string str "Title") Code above requires Express Tools installed. Used by the TCASE (Express Tool). http://help.autodesk.com/view/ACD/2021/ENU/?guid=GUID-085CF0C0-639C-4A4C-A2FC-CD885A7FDA38 1 Quote Share this post Link to post Share on other sites
amir0914 15 Posted Tuesday at 07:45 PM 26 minutes ago, Tharwat said: (strcat (strcase (substr "test" 1 1)) (substr "test" 2)) This code worked great, thanks man. Quote Share this post Link to post Share on other sites
Tharwat 161 Posted Tuesday at 07:48 PM 3 minutes ago, amir0914 said: This code worked great, thanks man. You're welcome anytime. 1 Quote Share this post Link to post Share on other sites
ronjonp 224 Posted Tuesday at 07:57 PM (edited) 12 minutes ago, amir0914 said: This code worked great, thanks man. FWIW, The proper function in excel will make a sentence title case. Tharwat's code will only change the first character. Edited Tuesday at 07:57 PM by ronjonp 1 Quote Share this post Link to post Share on other sites
amir0914 15 Posted Tuesday at 08:10 PM (edited) 13 minutes ago, ronjonp said: FWIW, The proper function in excel will make a sentence title case. Tharwat's code will only change the first character. Yes, you are right, but my text strings isn't a sentence, if you look at my examples, they are only one word. Edited Tuesday at 08:10 PM by amir0914 Quote Share this post Link to post Share on other sites
ronjonp 224 Posted Tuesday at 08:59 PM 48 minutes ago, amir0914 said: Yes, you are right, but my text strings isn't a sentence, if you look at my examples, they are only one word. Sounds good .. just bringing it up because you referenced the 'PROPER' excel function. 1 Quote Share this post Link to post Share on other sites
amir0914 15 Posted Tuesday at 10:11 PM 1 hour ago, ronjonp said: Sounds good .. just bringing it up because you referenced the 'PROPER' excel function. Thank you very much for following up, Quote Share this post Link to post Share on other sites