pragma solidity ^0.4.24;
contract DemoTypes{

//array
string[] strArr;

function add(string str)public{
     strArr.push(str);   
}


function deleteStrAt(uint index)private{
    //bianlishuzu
uint len= strArr.length;
if(index>=len) return;
    for(uint i=index;i<len-1;i++){
        strArr[i]=strArr[i+1];
    }
    
delete strArr[len-1];
strArr.length--;
}    

function updateStr(uint n,string s)private{
    strArr[n]=s;
}

function getStr(uint n)constant public returns(string s){
 string storage temp=strArr[n];
    return temp;
}

}