Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. //ArmanDoesStuff 2017
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5.  
  6. public static class ArmanLibrary
  7. {
  8. //Check if string only contains digits
  9. public static bool IsDigitsOnly(this string str)
  10. {
  11. foreach (char c in str)
  12. {
  13. if (c < '0' || c > '9')
  14. {
  15. return false;
  16. }
  17. }
  18. return true;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement