From c7191c6e27aa0960521861d757360727ce42e71a Mon Sep 17 00:00:00 2001 From: Fabio Lima Date: Wed, 30 Aug 2023 03:37:05 -0300 Subject: [PATCH] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index e645b61..ecad9ee 100644 --- a/README.md +++ b/README.md @@ -201,11 +201,15 @@ Get the creation instant of a ULID: Instant instant = ulid.getInstant(); // 2007-02-16T02:13:14.633Z ``` +--- + ```java // static method Instant instant = Ulid.getInstant("0123456789ABCDEFGHJKMNPQRS"); // 2007-02-16T02:13:14.633Z ``` +--- + Get only the time component substring: ```java @@ -213,6 +217,8 @@ String ulidTimePart = ulid.toString() .substring(0, Ulid.TIME_CHARS); // 0123456789 ``` +--- + Get only the random component substring: ```java @@ -220,6 +226,8 @@ String ulidRandPart = ulid.toString() .substring(Ulid.TIME_CHARS, Ulid.RANDOM_CHARS); // ABCDEFGHJKMNPQRS ``` +--- + Insert a string between the time and random components efficiently (avoiding concatenation) ([#29](https://github.com/f4b6a3/ulid-creator/pull/29)): ```java