Need Help Finding a Function that Limits at a certain number

In High School, a teacher of mine showed us a function that as it approached infinity, it would hit a certain specified number. This function would really help me with a function I am trying to design for an experience system in a software project, however, I’m having trouble remembering the specifics of this function.

If I remember correctly, it had to do with the properties of adding some sort of fraction where $ \frac{x}{\text{some number}}$ to a larger fraction. My goal is to set the limit at some arbitrary number, and in a somewhat logarithmic way, approach the arbitrary number, but not exceed it.

My question is, what is the best way to design a function that has these properties, or is there an existing well-known function that has these properties?