Snippet for IP
#1

Is there a snippet that gets the first 2 digits of an IP? For example, instead of getting "127.0.0.1", I get "127.0".

If there is, please paste it below.

Thanks in advance!
Reply
#2

Use sscanf's array specifier and split by dot.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
Use sscanf's array specifier and split by dot.
Thanks, forgot about that one!

(Can't give rep anymore, sorry)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)