South Carolina sends 50 delegates to the Republican national convention. The formula for the South Carolina Republican Party’s delegate allocation is that the candidate with the most popular votes wins 29 delegates. Then, the other 21 delegates are apportioned by U.S. House district. South Carolina has seven districts, and each district has three votes. The winner in each district gets three votes. Trump carried all seven districts. See this story.
Marco Rubio carried the state’s most populous county, Richland, which contains Columbia. But Richland County is split into two different districts, and when the vote from the other counties that are included in the two districts that also contain Richland County are factored in, Rubio did not carry any district. So, the candidate who got 32.4% of the popular vote received 100% of the delegates.