AMX Mod X API Documentation

Signature
stock implode_strings(const strings[][], numStrings, const join[], buffer[], maxLength){ new total, length, part_length; new join_length = strlen(join); for(new i=0; i<numStrings; i++) { length = copy(buffer[total], maxLength-total, strings[i]); total += length; if(length < part_length) { break; } if(i != numStrings - 1) { length = copy(buffer[total], maxLength-total, join); total += length; if(length < join_length) { break; } } } return total;}
Description

Joins an array of strings into one string, with a "join" string inserted in

between each given string. This function complements ExplodeString.

Parameters
  • strings An array of strings.
  • numStrings Number of strings in the array.
  • join The join string to insert between each string.
  • buffer Output buffer to write the joined string to.
  • maxLength Maximum length of the output buffer.
Returns

Number of bytes written to the output buffer.

Назад
Верх