Tuesday, 17 September 2013

finding the length of scanf() without storing the result

finding the length of scanf() without storing the result

How would i go about finding the length of a scanf() where i am scanning
from a string up until a certain character WITHOUT actually storing it?
scanf(stringToBeTested, "%[upUntilThis]", StoreToThisString)
strlen(scanf(stringToBeTested, "%[upUntilThis]", StoreToThisString))
?

No comments:

Post a Comment