kdb/q: How to apply a string manipulation function to a vector of strings to output a vector of strings?
问题 Thanks in advance for the help. I am new to kdb/q, coming from a Python and C++ background. Just a simple syntax question: I have a string with fields and their corresponding values pp_str: "field_1:abc field_2:xyz field_3:kdb" I wrote an atomic (scalar) function to extract the value of a given field. get_field_value: {[field; pp_str] pp_fields: " " vs pp_str; pid_field: pp_fields[where like[pp_fields; field,":*"]]; start_i: (pid_field[0] ss ":")[0] + 1; end_i: count pid_field[0]; indices: