Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.pubnub.api;
 
PubnubUtil class provides utility methods like urlEncode etc

Author(s):
Pubnub
public class PubnubUtil extends PubnubUtilCore {

    
Returns encoded String

Parameters:
sUrl , input string
Returns:
, encoded string
    public static String urlEncode(String sUrl) {
        try {
            return URLEncoder.encode(sUrl"UTF-8").replace("+""%20");
        } catch (UnsupportedEncodingException e) {
            return null;
        }
    }
New to GrepCode? Check out our FAQ X