Is it a foul?

Let’s say I’m stripes and I hit a stripe but the ball hits no rails. Is it considered a foul?