MCPcopy Create free account
hub / github.com/HumbleUI/JWM / makeString

Method makeString

shared/java/ClipboardEntry.java:63–69  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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>

Callers 3

makePlainTextMethod · 0.95
makeHTMLMethod · 0.95
makeRTFMethod · 0.95

Calls 1

makeMethod · 0.95

Tested by

no test coverage detected