  While $d$-wave superconducting pairing symmetry dominates in cuprates, both
$s$ and $d$ waves have been observed in infinite-layer nickelates.
Understanding this novel difference is central to demystifying the similarities
and distinctions between nickelates and cuprates. Here, by combining
determinant quantum Monte Carlo with density-matrix renormalization group
simulations in inhomogeneous Hubbard models, we discover that the charge-stripe
period $\mathcal{P}$, differing in cuprates and nickelates, plays an unexpected
role in determining the emergence of distinct pairing symmetries.
Interestingly, while the $d$ wave is dominant for $\mathcal{P} \ge 4$, both
(extended) $s$ and $d$ waves can appear when $\mathcal{P} \le 3$. Taking
$\mathcal{P}=3$ as the case for nickelates, we discover that the interplay
between the hole-doping concentration $\delta$ and charge-stripe amplitude
$V_0$ can realize a novel $d$-$s$ wave transition. This interesting phenomenon
originates from the charge-stripe-induced domain wall, which forms an unusual
selection rule to generate $s$ and $d$ waves around the on-stripe region and
inside the inter-stripe region, respectively, and gives rise to a critical
point of $\mathcal{P}=3$ for the phase transition. Remarkably, during this
transition, the $d$-wave state is transformed into a pairing-density wave
state, competing with the $s$-wave state. Moreover, a novel
magnetic-correlation transition accompanies the $d$-$s$ wave transition,
indicating the inherent coupling between charge stripe, superconducting
pairing, and magnetic correlation. In general, our unbiased simulations provide
new insights into the difference in the superconducting pairing mechanism
between nickelates and cuprates, highlighting the decisive role of charge
stripe.
