Skip to main content
Known Participant
Aug 27, 2022 3:33 PM UTC
Solved

find letter series {a , bc, def, ghij, klmno __________________________ a-z}

A,                                             1

BC,                                          2

DEF,                                        3

GHIJ,                                       4

KLMNO                                   5

---------                                     --

A to Z                                      26

harshitb6843
Brainy
Aug 29, 2022 5:54 AM UTC

a!forEach(
  items: enumerate(8),
  expression: joinarray(
    a!forEach(
      items: enumerate(fv!index) + sum(enumerate(fv!index)) + 1,
      expression: index(
        "abcdefghijklmnopqrstuvwxyz",
        fv!item,
        {}
      )
    )
  )
)

7 replies

stefanhelzle0001
Brainy
Aug 28, 2022 6:35 AM UTC

Is that a real use case or just a coding challenge?

Known Participant
Aug 28, 2022 8:18 PM UTC

This is challenge..our requirement..this logic is possible in our appini

Inspiring
Aug 29, 2022 3:51 AM UTC

what exactly you are looking for. Only the count of charaters in a string? if yes, then you can use len() function.

Known Participant
Aug 29, 2022 4:53 AM UTC

I want above letter series

harshitb6843
Brainy
Aug 29, 2022 5:54 AM UTC

a!forEach(
  items: enumerate(8),
  expression: joinarray(
    a!forEach(
      items: enumerate(fv!index) + sum(enumerate(fv!index)) + 1,
      expression: index(
        "abcdefghijklmnopqrstuvwxyz",
        fv!item,
        {}
      )
    )
  )
)

Known Participant
Aug 29, 2022 8:42 AM UTC

thank you