The Neconyan handbook
Your guides Miso, Taro & Nori
Choose each guide's gender to change their artwork and pronouns. Your choices stay in this browser, separately from the app.
Text¶
These Macro Enhanced macros change or measure text. Positions start at 0. Where supported, a negative position counts backwards from the end, and the end position is excluded.
Browser prompts only. These macros only run in the browser. Ordinary Roleplay replies build their prompts there, so they work. Conversation replies, Deep Swipe and replies with a selected Notebook context build their prompts on the server and stop before the model request if one is used. Test them in the Macro Enhanced Playground, and see Macro Enhanced in Roleplay prompts for the full list.
Use default for a missing value and wrap for punctuation that should appear only when there is something inside it.
The token-count helpers use a rough character estimate. For an exact prompt limit, check the selected model’s token count. Text length also follows the app’s string handling, so a visible emoji can take more than one position.
capitalize¶
Capitalises the first letter of the text.
Result: Hello world.
Arguments and other names
- text: The text to capitalise.
- Other accepted names:
cap,me-capitalize.
default¶
Uses a fallback when the value is empty or only whitespace. A value of 0 is kept.
Result: unknown in the first example.
Arguments and other names
- value: The value to check.
- fallback: What to use when the value is empty.
- Other accepted names:
me-default.
More examples:
length¶
Returns the number of characters in the text.
Result: 5.
Arguments and other names
- text: The text to measure.
- Other accepted names:
me-length.
lower¶
Converts text to lowercase.
Result: hello.
Arguments and other names
- text: The text to convert to lowercase.
- Other accepted names:
me-lower.
padend¶
Pads the end of the text to a target length.
Result: 7000.
Arguments and other names
- text: The text to pad.
- length: The target length (max 500).
- pad: Optional. The padding characters. Default: empty text.
- Other accepted names:
me-padend.
padstart¶
Pads the start of the text to a target length.
Result: 0007.
Arguments and other names
- text: The text to pad.
- length: The target length (max 500).
- pad: Optional. The padding characters. Default: empty text.
- Other accepted names:
me-padstart.
regexreplace¶
Replaces matches of a regular expression, a text-search pattern. Invalid patterns return the original text with a warning. Complex patterns on long text can be slow.
Result: a#b#c#.
Arguments and other names
- text: The text to search in.
- pattern: A regular expression (max 200 characters).
- replacement: Optional. The replacement; $1-$9 insert capture groups. Default: empty text.
- flags: Optional. Regex flags (g, i, m, s, u). Default:
g. - Other accepted names:
me-regexreplace.
repeat¶
Repeats the text a number of times.
Result: nananana.
Arguments and other names
- text: The text to repeat.
- count: How many times to repeat (max 1000).
- Other accepted names:
me-repeat.
replace¶
Replaces every occurrence of a plain-text search string. Note: a literal '::' cannot appear in arguments.
Result: the dog sat.
Arguments and other names
- text: The text to search in.
- search: The exact text to find. Every occurrence is replaced.
- replacement: Optional. The replacement text. Leave out to delete the matches. Default: empty text.
- Other accepted names:
me-replace.
split¶
Returns one piece of a split-up string. Returns nothing when the position is past either end.
Result: green.
Arguments and other names
- text: The text to split.
- separator: What to split on. Leave empty for a single space; write
{{space}}to be explicit. - index: Which piece to return, counting from 0. Negative counts from the end.
- Other accepted names:
me-split.
substring¶
Extracts part of the text by character positions.
Result: hello in the first example.
Arguments and other names
- text: The source text.
- start: Start position (0-based). Negative counts from the end.
- end: Optional. End position (exclusive). Negative counts from the end. Omit for 'until the end'.
- Other accepted names:
substr,me-substring.
More examples:
titlecase¶
Uppercases the first letter of every word.
Result: The Winter Market.
Arguments and other names
- text: The text to convert.
- Other accepted names:
me-titlecase.
tokencount¶
Estimates the token count using about four characters per token. It does not use the selected model’s token counter.
Result: 3, an estimate.
Arguments and other names
- text: The text to estimate.
- Other accepted names:
me-tokencount.
truncate¶
Shortens text to a maximum number of characters.
Result: Hello w….
Arguments and other names
- text: The text to shorten.
- max: Maximum length in characters, including the ellipsis.
- ellipsis: Optional. Appended when the text is shortened. Default:
…. - Other accepted names:
me-truncate.
truncatetokens¶
Shortens text using an estimate of four characters per token. Actual model token counts can differ substantially; use the model’s token counter for a hard limit.
Arguments and other names
- text: The text to shorten.
- maxTokens: Rough maximum length in tokens.
- ellipsis: Optional. Appended when the text is shortened. Default:
…. - Other accepted names:
me-truncatetokens.
upper¶
Converts text to uppercase.
Result: HELLO.
Arguments and other names
- text: The text to convert to uppercase.
- Other accepted names:
me-upper.
wordcount¶
Counts the words in the text.
Result: 5.
Arguments and other names
- text: The text to count.
- Other accepted names:
me-wordcount.
wrap¶
Places a prefix and suffix around a value. Produces no text if the value is empty.
Result: [ready].
Arguments and other names
- prefix: Put in front of the value. Write
{{space}}for a space. - suffix: Put after the value.
- value: The value to surround.
- Other accepted names:
me-wrap.