Recommended code to know if a string is an unsigned integer (and nothing else)

What code would you recommend to recognize that a string is an unsigned integer?
All characters are from 0 to 9, Examples: 35, 2, 278, etc. Wrong: 2.4, -25, 4m. 2m5, +15., etc
A RegEx code?

Yes, \A\d+\z

For performance, create the RegEx instance once and reuse it.

Thanks a lot, Kem. That’s what I supposed.