stringSplitCostModel models split: it scans the receiver and allocates the parts.
(id string)
| 1016 | |
| 1017 | // stringSplitCostModel models split: it scans the receiver and allocates the parts. |
| 1018 | func stringSplitCostModel(id string) cost.OverloadModel { |
| 1019 | return cost.MemberOverload(id, |
| 1020 | cost.EvalCost(cost.AllocList( |
| 1021 | cost.StringScan(cost.Sum(cost.Length(cost.Target()), cost.Const(1))), |
| 1022 | cost.Length(cost.Result()), |
| 1023 | )), |
| 1024 | cost.ResultSize(splitSize(cost.Target())), |
| 1025 | cost.BeforeVersion(1, cost.ResultSize(cost.List(cost.AtMost(cost.Target()), cost.AtMost(cost.Target())))), |
| 1026 | ) |
| 1027 | } |
| 1028 |
no test coverage detected