Hi, can someone please help me, how could  I convert a string input in a console like:

-u username -p password 

to get username and password as parameters for my procedure. Can i read the input and make an '' if i fine -u put the rest of the string in the parameter username''? is this making any sens? Can someone please help, i assume that it's a very simple thing to do but I'm a begginer and I'm tring to learn Perplexed please help me!