I used to call coyotes with a handicapped neighbor, I got him set up in a good position, then set up the call and turned it on and jumped in to a bush full of javelina's. The .223 I had with me did not do the trick, it mearly wounded the two I shot. It took a bit of time and a new pair of pants to track the wounded ones down.
I wounded one with a 7mm Rem Mag and a 150 grain Sierra game king at 3200 fps MV. I shot that pig from 50 yards away. The REASON was NOT the caliber, but shot placement. It was my first Javelina and I instinctively held on him just as i would a deer, just behind the shoulder. Now hogs, and ESPECIALLY Javelina, have all their vitals under the shoulder. If you place a shot behind the shoulder, all you get is guts. That Javelina had his guts blown completely out, was draggin' 'em when I caught up to him, and he had enough spunk to turn on me charging and snapping his teeth at which time I popped him in the head with my .357 revolver (heavy cover on my hands and knees, rifle was slung) and he went down DRT. Trackin' him wasn't hard, all the blood and chunks of meat on the ground where he went. I then sat down for 5 minutes until I got rid of the shakes. We tracked a buddy's first wild boar for the same reason, he put the round behind the shoulder. I know where to shoot now days. LOL!
Javelina are one TOUGH little toothy critter. Those things can take a hit and they'll be dangerous when you go after 'em. A wild hog, while a lot bigger, will at most take a swipe at you as he tries to get away. A Javelina gets down right MEAN. This one was a big boar, is on my living room wall, weighed almost 60 lbs. That's huge for a stink pig. I never will forget that experience.
Since that experience, I've hunted Javelina with a .357 revolver successfully. If you get down wind and can use cover, you can get real close to 'em 'cause they're kinda the animal world's version of Stevie Wonder for eyesight. It's more fun to sneak up on 'em with a 4" revolver. I don't want to kill 'em for the meat, anyway, the meat sucked, but the challenge of getting inside revolver range is fun. If a .357 revolver is plenty, your .223 is plenty.
Now, Javelina are smaller and not as tough as a hog to penetrate. Hogs take more bullet, but I've shot 'em with the .357 successfully, too. All about putting the right bullet in the right place. If I'm going to use a rifle, I'm going for overkill, but the OP is talking about spotting one when he's yote hunting with his .223. I would not hesitate to take a shot if I had a clear, easy head shot and if you've got the accuracy for yotes, that shouldn't be a problem on past 100 yards.