Make new clipboard entry from format and plain text. @param format clipboard entry format @param text raw string text @return clipboard entry
(ClipboardFormat format, String text)
| 61 | * @return clipboard entry |
| 62 | */ |
| 63 | @NotNull @SneakyThrows |
| 64 | public static ClipboardEntry makeString(ClipboardFormat format, String text) { |
| 65 | if (Platform.CURRENT == Platform.X11 || Platform.CURRENT == Platform.MACOS) { |
| 66 | return make(format, text.getBytes("UTF-8")); |
| 67 | } |
| 68 | return make(format, text.getBytes("UTF-16LE")); |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * <p>Get clipboard entry content as string text.</p> |
no test coverage detected