Android or Java delete string which contain similar string
I have 2 Strings

1st:

    String str=",1,2,3,4,5";

2nd:
    
    String num=",3";

I want to do like if "str" contain "num", then it will remove the "num" from "str". Which mean the output will be: ,1,2,4,5

What should I do?
Android or Java delete string which contain similar string
===

I have 2 Strings

1st:

    String str=",1,2,3,4,5";

2nd:
    
    String num=",3";

I want to do like if "str" contain "num", then it will remove the "num" from "str". Which mean the output will be: ,1,2,4,5

What should I do?