Hacker News new | ask | show | jobs
by bigpingo 547 days ago

  printf("%.*s", len, str);
lets you pass the length as an int argument.