- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for requireBracketsForIPv6 (0.18 seconds)
-
android/guava/src/com/google/common/net/HostAndPort.java
* An immutable representation of a host and port. * * <p>Example usage: * * {@snippet : * HostAndPort hp = * HostAndPort.fromString("[2001:db8::1]") * .withDefaultPort(80) * .requireBracketsForIPv6(); * hp.getHost(); // returns "2001:db8::1" * hp.getPort(); // returns 80 * hp.toString(); // returns "[2001:db8::1]:80" * } * * <p>Here are some examples of recognized formats: * * <ul>Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 19:19:10 GMT 2026 - 11.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/net/HostAndPortTest.java
assertThat(HostAndPort.fromString("[::1]").requireBracketsForIPv6().getHost()).isEqualTo("::1"); assertThat(HostAndPort.fromString("[::1]:80").requireBracketsForIPv6().getHost()) .isEqualTo("::1"); // Non-bracketed non-IPv6 works fine. assertThat(HostAndPort.fromString("x").requireBracketsForIPv6().getHost()).isEqualTo("x"); assertThat(HostAndPort.fromString("x:80").requireBracketsForIPv6().getHost()).isEqualTo("x");
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 15:59:55 GMT 2026 - 9.7K bytes - Click Count (0) -
guava-tests/test/com/google/common/net/HostAndPortTest.java
assertThat(HostAndPort.fromString("[::1]").requireBracketsForIPv6().getHost()).isEqualTo("::1"); assertThat(HostAndPort.fromString("[::1]:80").requireBracketsForIPv6().getHost()) .isEqualTo("::1"); // Non-bracketed non-IPv6 works fine. assertThat(HostAndPort.fromString("x").requireBracketsForIPv6().getHost()).isEqualTo("x"); assertThat(HostAndPort.fromString("x:80").requireBracketsForIPv6().getHost()).isEqualTo("x");
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 15:59:55 GMT 2026 - 10K bytes - Click Count (0)