C++ | best solution Using substr()
class Solution {\npublic:\n\n    vector divideString(string s, int k, char fill) {\n        vector v;\n        int i = 0;\n        while(i < s.size()){\n       
class Solution {\npublic:\n\n    vector<string> divideString(string s, int k, char fill) {\n        vector<string> v;\n        int i = 0;\n        while(i < s.size()){\n            string str = "";\n            str = s.substr(i , k);\n            int n = str.size();\n            if(n != k){\n               while(n < k){\n                str += fill;\n                n++;\n               }\n            }\n            v.push_back(str);\n            i = i+ k;   \n        }\n        return v;\n        \n    }\n};\n\n**Please Upvote :)**
['C']