Spaces:
Running
Running
owenkaplinsky
commited on
Commit
·
3e990c1
1
Parent(s):
985bf2f
Fix toolbox; blocks info
Browse files- project/blocks.txt +2 -1
- project/src/toolbox.js +0 -35
project/blocks.txt
CHANGED
|
@@ -37,6 +37,7 @@ text_length(VALUE: value)
|
|
| 37 |
text_join(inputs(ADDN: value)) // N starts at 0; you can make as many N as you want
|
| 38 |
text_isEmpty(inputs(VALUE: value)) // Boolean output
|
| 39 |
text_changeCase(inputs(CASE: "UPPERCASE/LOWERCASE/TITLECASE", TEXT: value))
|
|
|
|
| 40 |
text_reverse(inputs(TEXT: value))
|
| 41 |
text_count(inputs(SUB: value, TEXT: value)) // Integer output
|
| 42 |
text_replace(inputs(FROM: value, TO: value, TEXT: value))
|
|
@@ -45,7 +46,7 @@ text_trim(inputs(MODE: "BOTH/LEFT/RIGHT", TEXT: value)) // Trim spaces from text
|
|
| 45 |
# Lists
|
| 46 |
lists_length(inputs(VALUE: value))
|
| 47 |
lists_isEmpty(inputs(VALUE: value)) // Boolean output
|
| 48 |
-
lists_indexOf(inputs(END: "FIRST/LAST", VALUE: value, FIND: value))
|
| 49 |
lists_reverse(inputs(LIST: value))
|
| 50 |
lists_create_with(inputs(ADDN: value)) // N starts at 0; you can make as many N as you want
|
| 51 |
lists_sort(inputs(TYPE: "NUMERIC/TEXT/IGNORE_CASE", DIRECTION: "1/-1")) // For direction, 1 is ascending, -1 is descending
|
|
|
|
| 37 |
text_join(inputs(ADDN: value)) // N starts at 0; you can make as many N as you want
|
| 38 |
text_isEmpty(inputs(VALUE: value)) // Boolean output
|
| 39 |
text_changeCase(inputs(CASE: "UPPERCASE/LOWERCASE/TITLECASE", TEXT: value))
|
| 40 |
+
text_getSubstring(inputs(WHERE1: "FROM_START/FROM_END/FIRST", WHERE2: "FROM_START/FROM_END/FIRST", STRING: value, AT1: value, AT2: value)) // For AT1 and AT2, only use them if the associated WHEREN is not "FROM_START"
|
| 41 |
text_reverse(inputs(TEXT: value))
|
| 42 |
text_count(inputs(SUB: value, TEXT: value)) // Integer output
|
| 43 |
text_replace(inputs(FROM: value, TO: value, TEXT: value))
|
|
|
|
| 46 |
# Lists
|
| 47 |
lists_length(inputs(VALUE: value))
|
| 48 |
lists_isEmpty(inputs(VALUE: value)) // Boolean output
|
| 49 |
+
lists_indexOf(inputs(END: "FIRST/LAST", VALUE: value, FIND: value))
|
| 50 |
lists_reverse(inputs(LIST: value))
|
| 51 |
lists_create_with(inputs(ADDN: value)) // N starts at 0; you can make as many N as you want
|
| 52 |
lists_sort(inputs(TYPE: "NUMERIC/TEXT/IGNORE_CASE", DIRECTION: "1/-1")) // For direction, 1 is ascending, -1 is descending
|
project/src/toolbox.js
CHANGED
|
@@ -388,13 +388,6 @@ export const toolbox = {
|
|
| 388 |
{
|
| 389 |
kind: 'block',
|
| 390 |
type: 'text_getSubstring',
|
| 391 |
-
inputs: {
|
| 392 |
-
STRING: {
|
| 393 |
-
block: {
|
| 394 |
-
type: 'variables_get',
|
| 395 |
-
},
|
| 396 |
-
},
|
| 397 |
-
},
|
| 398 |
},
|
| 399 |
{
|
| 400 |
kind: 'block',
|
|
@@ -494,46 +487,18 @@ export const toolbox = {
|
|
| 494 |
{
|
| 495 |
kind: 'block',
|
| 496 |
type: 'lists_indexOf',
|
| 497 |
-
inputs: {
|
| 498 |
-
VALUE: {
|
| 499 |
-
block: {
|
| 500 |
-
type: 'variables_get',
|
| 501 |
-
},
|
| 502 |
-
},
|
| 503 |
-
},
|
| 504 |
},
|
| 505 |
{
|
| 506 |
kind: 'block',
|
| 507 |
type: 'lists_getIndex',
|
| 508 |
-
inputs: {
|
| 509 |
-
VALUE: {
|
| 510 |
-
block: {
|
| 511 |
-
type: 'variables_get',
|
| 512 |
-
},
|
| 513 |
-
},
|
| 514 |
-
},
|
| 515 |
},
|
| 516 |
{
|
| 517 |
kind: 'block',
|
| 518 |
type: 'lists_setIndex',
|
| 519 |
-
inputs: {
|
| 520 |
-
LIST: {
|
| 521 |
-
block: {
|
| 522 |
-
type: 'variables_get',
|
| 523 |
-
},
|
| 524 |
-
},
|
| 525 |
-
},
|
| 526 |
},
|
| 527 |
{
|
| 528 |
kind: 'block',
|
| 529 |
type: 'lists_getSublist',
|
| 530 |
-
inputs: {
|
| 531 |
-
LIST: {
|
| 532 |
-
block: {
|
| 533 |
-
type: 'variables_get',
|
| 534 |
-
},
|
| 535 |
-
},
|
| 536 |
-
},
|
| 537 |
},
|
| 538 |
{
|
| 539 |
kind: 'block',
|
|
|
|
| 388 |
{
|
| 389 |
kind: 'block',
|
| 390 |
type: 'text_getSubstring',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 391 |
},
|
| 392 |
{
|
| 393 |
kind: 'block',
|
|
|
|
| 487 |
{
|
| 488 |
kind: 'block',
|
| 489 |
type: 'lists_indexOf',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 490 |
},
|
| 491 |
{
|
| 492 |
kind: 'block',
|
| 493 |
type: 'lists_getIndex',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 494 |
},
|
| 495 |
{
|
| 496 |
kind: 'block',
|
| 497 |
type: 'lists_setIndex',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 498 |
},
|
| 499 |
{
|
| 500 |
kind: 'block',
|
| 501 |
type: 'lists_getSublist',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 502 |
},
|
| 503 |
{
|
| 504 |
kind: 'block',
|