\documentclass[a4paper]{article}

\begin{document}
{\ttfamily\frenchspacing
a :b

a : b

a \string: b

a :~b

a ; b
}


{\ttfamily
a :b

a : b

a \string: b

a :~b

a ; b
}

a :b

a : b

a \string: b

a :~b

a ; b

\frenchspacing
a :b

a : b

a \string: b

a :~b

a ; b
\end{document}
