title: How can i add chars to proceed string to custom ending?
body: <p>I have string template, like <code>+7 (***) ***-**-**</code> and input vars like <code>+7 (123)</code> or <code>+7 (123) 45</code>. I need to complete input var to mask template, it must be <code>+7 (123) ***-**-**</code> and <code>+7 (123) 45*-**-**</code> (for upper examples).</p>
  
  <p>I know about <code>str_pad</code>, but it's didn't help for this task. Google didn't help me to.</p>