You can split the input at each token and then deliver them separated by periods; with \initformat you can choose the formatting, the argument should be a one parameter macro such as \MakeUppercase or \textsc.
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand{\init}{m}
{
\tanh_init:n { #1 }
}
\NewDocumentCommand{\initformat}{m}
{
\cs_set_eq:NN \tanh_init_format:n #1
}
\seq_new:N \l_tanh_init_seq
\cs_new_protected:Nn \tanh_init:n
{
\seq_set_split:Nnn \l_tanh_init_seq { } { #1 }
\tanh_init_format:n { \seq_use:Nn \l_tanh_init_seq { . } .\@ }
}
\ExplSyntaxOff
\initformat{\MakeUppercase} % initialize
\begin{document}
\init{abc}
\initformat{\textsc}
\init{abc}
\end{document}

If you want to remove the trailing period when the initialism is followed by a period, you can check for it and take a decision. In the example I used \xspaceskip to make the effect more visible.
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand{\init}{m}
{
\tanh_init:n { #1 }
}
\NewDocumentCommand{\initformat}{m}
{
\cs_set_eq:NN \tanh_init_format:n #1
}
\seq_new:N \l_tanh_init_seq
\cs_new_protected:Nn \tanh_init:n
{
\seq_set_split:Nnn \l_tanh_init_seq { } { #1 }
\tanh_init_format:n { \seq_use:Nn \l_tanh_init_seq { . } }
\tanh_init_period:
}
\cs_new_protected:Nn \tanh_init_period:
{
\peek_charcode:NTF . { \@ } { \tanh_init_format:n { . } \@ }
}
\ExplSyntaxOff
\xspaceskip=20pt
\initformat{\MakeUppercase} % initialize
\begin{document}
\init{abc} whatever
\init{abc}. A period!
\initformat{\textsc}
\init{abc} whatever
\init{abc}. A period!
\end{document}

If you want to preserve kerning, you need to make the test about . beforehand:
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand{\init}{m}
{
\tanh_init:n { #1 }
}
\NewDocumentCommand{\initformat}{m}
{
\cs_set_eq:NN \tanh_init_format:n #1
}
\seq_new:N \l_tanh_init_seq
\cs_new_protected:Nn \tanh_init:n
{
\seq_set_split:Nnn \l_tanh_init_seq { } { #1 }
\tanh_init_period:
}
\cs_new_protected:Nn \tanh_init_period:
{
\peek_charcode_remove:NTF .
{
\tanh_init_format:n { \seq_use:Nn \l_tanh_init_seq { . } . } \spacefactor\sfcode`.~
}
{
\tanh_init_format:n { \seq_use:Nn \l_tanh_init_seq { . } . } \@
}
}
\ExplSyntaxOff
\xspaceskip=20pt
\initformat{\MakeUppercase} % initialize
\begin{document}
\init{abp} whatever
\init{abp}. A period!
\initformat{\textsc}
\init{abp} whatever
\init{abp}. A period!
\textsc{a.b.p.} A period!
\end{document}

\initformat{}) anywhere in the document? – Tor Nov 27 '15 at 17:38\init{abc}instead of\init abc\relax{}, you mean? – egreg Nov 27 '15 at 18:01\initcommand in @jarauh's answer above like this:\newcommand{\myinit}[1]{\init#1\relax{}}. I tried adding functionality for handling the case of an initialism ending a sentence (manuallyIt is based on G.N.U\@.) by replacing.\@toward the end of your code with\@ifnextchar.{\@.}{.\@}but I then get "IFNEXTCHAR" as part of the printed output. (I realize it must be obvious why this does not work if you know xparse package, but I couldn't figure it out.) – Tor Nov 29 '15 at 03:19
\init{pp}andP.P.. With\init{pp}, the space between the first P and the first period is correctly kerned, whereas the second P and the second period are separated by a bigger space. I was able to make out that\@.breaks kerning (P\@.is not kerned correctly), but have not found a way to modify the space factor inside the macro definition. – Tor Dec 08 '15 at 18:08\usepackage{mathpazo}and replace the body with\begin{document}\fontfamily{lmr}\selectfontP.P. \par\init{pp} \par\fontfamily{ppl}\selectfontP.P. \par\init{pp}\end{document}produces this output (vertical lines added manually): http://i.imgur.com/NiUN79p.png. (Sorry about the formatting!) – Tor Dec 09 '15 at 14:22