If you use the xparse package, then you can very nicely define a single command which will set the roman numerals in upper or lower case depending on whether or not there is a star to the command name.
Here is a MWE which uses a counter
\documentclass{article}
\newcounter{myromanumeral}
\usepackage{xparse}
\NewDocumentCommand{\myrm}{s m}
{\setcounter{myromanumeral}{#2}%
\IfBooleanTF #1{\Roman}{\roman}{myromanumeral}}
\begin{document}
Hello, does this work \myrm{19}? Or this \myrm*{19}?
\end{document}
If you really don't want to use a counter you can do something like the following:
\makeatletter
\NewDocumentCommand{\myrmo}{s m}
{\expandafter\def\csname c@my@private@counter\endcsname{#2}%
\IfBooleanTF #1{\Roman}{\roman}{my@private@counter}}
\makeatother
Please notice how in my code I use % at the end of the lines. This prevents extra space from creeping in where I don't want it.
If you want to stick with your own commands, then rewrite them as
\newcounter{counter}
\newcommand{\upperRomannumeral}[1]{%
\setcounter{counter}{#1}%
\Roman{counter}%
}
\newcommand{\lowerromannumeral}[1]{%
\setcounter{counter}{#1}%
\roman{counter}%
}
\setcounterand avoid the spurious spaces within the macro. – Werner Jan 13 '13 at 05:27