question: @ Nullable public static String extractProtocol ( @ NotNull String url ) { int index = url . indexOf ( URLUtil . SCHEME_SEPARATOR ) ; if ( index < 0 ) return null ; return url . substring ( 0 , index ) ; }
target:  Extracts protocol from the given URL. Protocol is a substring from the beginning of the URL till "://".