> Hello!
>
> Quick question; how do I make a string entirely uppercase, such as "STRING",
> instead of just making it "String" with the macro CAP()? I am not a very
> good C programmer, so a quick help/tutorial would be nice.
CAP simply does a
*txt = UPPER(*txt);
where txt is a pointer to your string. You can improve it:
char *all_upercase(char *txt)
{
char *ptr;
for (ptr = txt; ptr; ptr++)
*ptr = UPPER(*ptr);
return (txt);
}
--
----=[ Juliano Ravasi Ferraz ]=----=[ jferraz@linkway.com.br ]=----
Rayon Eletrônica e Informática Ltda. - Linkway Descalvado
Never trust a woman who tells her real age.
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/10/01 PDT