An analysis of $B^+ to K_{rm scriptscriptstyle S}^0 pi^+$ and $B^+ to K_{rm scriptscriptstyle S}^0 K^+$ decays is performed with the LHCb experiment. The $pp$ collision data used correspond to integrated luminosities of $1{,fb}^{-1}$ and $2{,fb}^{-1}$ collected at centre-of-mass energies of $sqrt{s}=7mathrm{,Tekern -0.1em V}$ and $sqrt{s}=8mathrm{,Tekern -0.1em V}$, respectively. The ratio of branching fractions and the direct {it CP} asymmetries are measured to be $mathcal{B}(B^+ to K_{rm scriptscriptstyle S}^0 K^+)/mathcal{B}(B^+ to K_{rm scriptscriptstyle S}^0 pi^+) = 0.064 pm 0.009textrm{(stat.)} pm 0.004textrm{(syst.)}$, $mathcal{A}^{it CP}(B^+ to K_{rm scriptscriptstyle S}^0 pi^+) = -0.022 pm 0.025textrm{(stat.)} pm 0.010textrm{(syst.)}$ and $mathcal{A}^{it CP}(B^+ to K_{rm scriptscriptstyle S}^0 K^+) = -0.21 pm 0.14textrm{(stat.)} pm 0.01textrm{(syst.)}$. The data sample taken at $sqrt{s}=7mathrm{,Tekern -0.1em V}$ is used to search for $B_c^+ to K_{rm scriptscriptstyle S}^0 K^+$ decays and results in the upper limit $(f_ccdotmathcal{B}(B_c^+ to K_{rm scriptscriptstyle S}^0 K^+))/(f_ucdotmathcal{B}(B^+ to K_{rm scriptscriptstyle S}^0 pi^+)) < 5.8times10^{-2}textrm{at 90% confidence level}$, where $f_c$ and $f_u$ denote the hadronisation fractions of a $bar{b}$ quark into a $B_c^+$ or a $B^+$ meson, respectively.