⍝ is ⍺ a subvector of ⍵:

    'abba' subvec 'babba'
1
    'abba' subvec 'abbas'
1
    'abba' subvec 'baab'
0

    'abba' subvec 'abba'
1
    'abba'∘subvec¨'zabba' 'babba' 'abbas' 'baab'
1 1 1 0

    3 3 2 1 subvec 4 3 5 6 3 2 8 1 9
1
    1 2 3 4 subvec 1 3 4 2 1 2 3 4
1
    'abba' subvec 'ababa'
1
    1 2 3 subvec 3 2 1
0
    3 3 2 1 subvec 3 2 1
0
    3 3 2 1 subvec 4 3 5 6 3 2 8 1 9
1
    'also' 'work' subvec 'also' 'nested' 'arrays' 'work'
1
    0 subvec ,0     ⍝ ok with scalar larg
1

⍝∇ subvec

Back to: code

Back to: Workspaces