Skip to content

Commit

Permalink
Plain text: Add split function
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Dec 16, 2023
1 parent 2e8468c commit 66003d8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/routes/plain-text/split-join.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
function join() {
text = text.split("\n").join(separator);
}
function split() {
text = text.split(separator).join("\n");
}
</script>

<ActionCard title="Split/Join Lines">
Expand All @@ -21,4 +26,8 @@
label="Join"
on:click={join} />

<ActionCardItem
label="Split"
on:click={split} />

</ActionCard>

0 comments on commit 66003d8

Please sign in to comment.