Skip to main content
100%

Snap! custom block to compare two strings

✓ Published0🌍 Public
CCliffordAnderson
Last edited Mar 20, 2018
Created on Mar 20, 2018

This Snap! project defines two custom blocks that work together to compare strings character by character. The first block generates a numeric list from a given range, while the second block converts two input strings into lists and iterates through them. It checks whether each character from the first string appears sequentially in the second string, returning `true` if all characters match in order, and `false` if either string is empty or the sequence is not found. The visualization shows the block definitions and their interconnected control flow, using Snap!'s visual programming API to demonstrate substring detection.

AI-generated description

Similar vizzes