I am working on ndk lib which is developed in the C language. I want to add a feature to it. for that, I required one simple function which is similar to the bellow function